#include<stdio.h>
#include<conio.h>
void main()
{
int day;
float fine;
clrscr();
printf("enter the no. of dates the member is lateto return the book :");
scanf("%d",&day);
if (day>0 && day<=5)
{
printf("the rate is Rs 10 per day\n");
fine=(day*10);
printf("the fine is RS %.2f\n",fine);
}
else if(day>=6 && day<10)
{
printf("the rate is Rs 50 per day\n");
fine=(day*50);
printf("the fine is RS %.2f\n",fine);
}
else if(day>=10)
{
printf("the rate is Rs 100 per day\n");
fine=(day*100);
printf("the fine is RS %.2f\n",fine);
}
else
{
printf("plz check the numbers of day\n");
}
printf("DONT BE LATE NEXT TIME!!!!!!!!");
getch();
}
#include<conio.h>
void main()
{
int day;
float fine;
clrscr();
printf("enter the no. of dates the member is lateto return the book :");
scanf("%d",&day);
if (day>0 && day<=5)
{
printf("the rate is Rs 10 per day\n");
fine=(day*10);
printf("the fine is RS %.2f\n",fine);
}
else if(day>=6 && day<10)
{
printf("the rate is Rs 50 per day\n");
fine=(day*50);
printf("the fine is RS %.2f\n",fine);
}
else if(day>=10)
{
printf("the rate is Rs 100 per day\n");
fine=(day*100);
printf("the fine is RS %.2f\n",fine);
}
else
{
printf("plz check the numbers of day\n");
}
printf("DONT BE LATE NEXT TIME!!!!!!!!");
getch();
}
No comments:
Post a Comment