Code
#include<stdio.h>#include<conio.h>
int main()
{
int days;
float fine;
printf("Number of days late: ");
scanf("%d",&days);
if(days<=30)
{
if(days<=5)
fine=0.5;
else if(days>5&&days<=10)
fine=1;
else if(days>10&&days<=30)
fine=5;
printf("you have to pay fine of Rs %f",fine);
}
else
printf("Your membership has been canceled");
printf ("\n\nPress any key to close.");
getch ();
return 0;
}
Very very useful
ReplyDeleteYeah...it's very useful
DeleteUseful bro
ReplyDeleteno, i am looking for code if entered 25 then fine should be 82.50
ReplyDelete