Search This Blog

Monday 29 August 2011

C-PRAOGRAMM to find the mileage of a vehicle


#include<stdio.h>
#include<conio.h>
main()
{
float p,m,kms;
clrscr();
printf("enter the quantity of fuel you filled :");
scanf("%f",&p);
printf("enter the kilometers covered by %.2f liters of fuel :",p);
scanf("%f",&kms);
m=kms/p;
printf("the mialge of your vehicle is %.2f kilometers/liter",m);
getch();
}

No comments:

Post a Comment