- WAP to enter Lower And Upper Limit and Print the Cost.
#include <conio.h>
void main()
{
int up,lo,d;
float s;
clrscr();
printf("enter the upper limit");
scanf("%d",&up);
printf("enter the lower limit");
scanf("%d",&lo);
d=up-lo;
if((d>200)&&(d<500))
s=d*3.50;
if((d>100)&&(d<200))
s=d*2.50;
if(d<100)
s=d*1.50;
printf("the sum is %lf",s);
getch();
}
No comments:
Post a Comment