New to our community ?

Discover a world of possibilities! Join us and explore a vibrant community where ideas flourish and connections thrive.

One of Our Valued Members

Thank you for being part of our community. Your presence enriches our shared experiences. Let's continue this journey together!

Home Uncategorized C program to prompt user with option on menu at Post Office

C program to prompt user with option on menu at Post Office

0
#include<stdio.h>
#include<conio.h>
struct speed;
{
int rate;
float weight;
float distance;
};
void main()
{
struct speed sp;
printf("\n enter distance");
scanf("%f",&sp.distance);

printf("\n enter weight");
scanf("%f",&sp.weight);

if(sp.distance <=40 && sp.weight<=100)
{
printf("\n you have charged 20 rupees");
}
elseif(sp.distance<=40 && sp.weight>=100 && sp.weight<=100)
{
printf("\n rate si 40 rupees");
}
elseif(sp.distance>=41 && sp.distance<=100 && sp.weight>=200 && sp.weight<500)
{
printf("\n rate is 70");
}
else
{
printf("\n rate is 100");
}
getch();
}