Write a program to accept no. of hours a car is parked in a parking area & calculate the parking fees as given
below:
Upto 2 hours - Rs.40
>2 and <=5 hrs - Rs.25 / hr
>5 and <=8 hrs - Rs 18 / hr
>8 hrs - Rs 10 / hr
A gst of 8% is to be paid on the parking bill. Calculate the net parking bill amount.
Please asap. It's urgent
Answers
Answered by
0
Answer
in c language
Explanation:
#include<stdio.h>
void main()
{
int car=10,bus=20,bi=5,noofhours,fine=0;
char n;
printf("Please enter vehicle details c-car b-bus and B-bicycle");
scanf("%c",&n);
printf("Please enter no of hours");
scanf("%d",&noofhours);
if(n=='c')
{
fine=car*noofhours;
}
else if(n=='b')
{
fine=bus*noofhours;
}
else if(n=='B')
{
fine=bi*noofhours;
}
Similar questions