hey here is your code I have doen just now.
#include<stdio.h>
int main(){
float total=0;
int i,coun=0;
printf("Welcome to the Sears mileage calculator.\nThis program will calculate the miles per gallon for you for three tanks\n of gas after you have entered the gallons used and miles driven.\n");
while(coun<3){
printf("\nEnter the number of gallons used for tank %d#: ",coun+1);
float ufortank;
scanf("%f",&ufortank);
printf("\nEnter the number of miles driven: ");
float driven;
scanf("%f",&driven);
float temp=driven/ufortank;
printf("\n*** The miles per gallon for this tank is : %f ",temp);
total=total+temp;
coun++;
}
printf("\nYour overall average miles per gallon for three tanks is %f\n",total/3);
printf("\nThanks for using the program.");
return 0;
}
If you wanna pay me you can..... If not its ok.. :)