Cpps
#include <stdio.h>
int main ()
{
int no_of_people,no_days,add_p,b_status;
float cost=0;
printf("\n\t ##### Your Bill ####");
printf("\n\t no of people : ");
scanf("%d",&no_of_people);
printf("\n\t no of days of stay : ");
scanf("%d",&no_days);
printf("\n\tIs it a business status??(0\1) : ");
scanf("%d",&b_status);
if(no_of_people==1)
{
cost=2500no_days;
}
else if (no_of_people==2)
{
cost=3500no_days;
}
else if(no_of_people==3)
{
cost=4500*no_days;
}
printf("\n\t no of additional days : ");
scanf("%d",&add_p);
cost=cost+add_p*1000;
if(b_status==1)
{
cost=cost-cost*20/100;
}
printf("\n\tTotal bill is : %f",cost);
printf("\n\t Thank you Visit again");
return 0;
}
Voters