answersLogoWhite

0

#include minfee = 2; int main() { int car1,car2,car3,hour,hour2,hour3,charge1,charge2,charge3, totalhour,totalcharge,minfee; printf("Enter car number\n"); scanf("%d", &car1); printf("How many hour did the car park\n"); scanf("%d", &hour); if (hour>=3) { charge1 = (minfee+hour*0.50); } else { charge1 = 2.00; } printf("Enter car number\n"); scanf("%d", &car2); printf("How many hour did the car park\n"); scanf("%d", &hour2); if (hour>=3) { charge2 = (minfee+hour*.50); } else { charge2 = 2.00; } printf("Enter car number\n"); scanf("%d", &car3); printf("How many hour did the car park\n"); scanf("%d", &hour3); if(hour>=3) { charge3 = (minfee+hour*0.50); } else { charge3 = 2.00; } totalhour=(hour+hour2+hour3); printf("%d", totalhour); totalcharge=(charge1+charge2+charge3); printf("%d", totalcharge); return 0; }

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

How do you write a program that calculates the sum of the matrix elements given numbers?

ring me and ill explain - 086 22222222222222227 ring me


Write a C program to extract a given word from a file?

program to extract a given word from a file


Program in 'c' to find the LCM of any given five numbers?

Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.


C program for identifying given name is male or female?

Not possible.


Write a FORTRAN code to calculating factorials?

Here is a simple FORTRAN code to calculate the factorial of a given non-negative integer: program factorial implicit none integer :: n, result print *, "Enter a non-negative integer:" read *, n result = 1 if (n < 0) then print *, "Factorial is not defined for negative numbers." else do i = 1, n result = result * i end do print *, "Factorial of", n, "is", result end if end program factorial This program prompts the user for an integer, checks if it's non-negative, and then calculates the factorial using a loop.

Related Questions

How do you write a program that calculates the sum of the matrix elements given numbers?

ring me and ill explain - 086 22222222222222227 ring me


Which function calculates the averages of a given set of numbers in excel?

Surprisingly, it is =AVERAGE(number1, number2,...)


How much space is given when parallel parking in MD?

25feet


What are the benefits of echelon parking?

The benefits of echelon parking is that it allows one to park quicker and more easily than parking in a straight line. By parking at this angle it allows a greater number of cars to be parked in any given space.


What is a rate at which charges pass a given point?

Current


Write a C program to extract a given word from a file?

program to extract a given word from a file


Algorithms to the given c plus plus programs?

The question is impossible to answer. You cannot determine an algorithm from a given program if the program is not actually given in the question. Please place the program in the discussion section.


How many parking spaces in a given area?

That kind of depends on the space given but genrally guessing about 100 to 150 spaces.


Are there Parking Garage Membership or Day Passes in San Francisco?

Generally in San Francisco when you are staying at a local motel or hotel they have parking for you. Every time I have attended a conference or convention I have been given a parking space.


What is a purchases budget?

A purchases budget represents what a business plans to buy. It also calculates how much inventory it will hold over a given period of time.


What is Purchasing budget?

A purchases budget represents what a business plans to buy. It also calculates how much inventory it will hold over a given period of time.


Which of these methods calculates the market value of all final goods and services produced within a country's borders in a given year?

Gross Domestic Product