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?

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 is a rate at which charges pass a given point?

Current


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.


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.


Set of data or program instructions that has been given a name?

file is a set of data and program that has been given a name


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.