#include<stdio.h>
#include<conio.h>
void main()
{
float r,a=2.5,b=3.5,c=1.5;
clrscr();
printf(“enter the readings\n”);
scanf(“%f”,&r);
if(r>=200)
printf(“rupees=%f”,r*b);
else if((r>=100)&&(r<200))
printf(“rupees=%f”,r*a);
else
printf(“rupees=%f”,r*c);
getch();
}
Output:
enter the readings
140
rupees=350
#include<conio.h>
void main()
{
float r,a=2.5,b=3.5,c=1.5;
clrscr();
printf(“enter the readings\n”);
scanf(“%f”,&r);
if(r>=200)
printf(“rupees=%f”,r*b);
else if((r>=100)&&(r<200))
printf(“rupees=%f”,r*a);
else
printf(“rupees=%f”,r*c);
getch();
}
Output:
enter the readings
140
rupees=350
Contact:
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com