Thanks to all of you for your help so far. This is my revised version of the program. I'm still not too sure about how to get the loop average so continued input is still appreciated.
Code:
#include<stdio.h>
#include<conio.h>
int main()
{
int km, i;
float res, lt, sum, avg;
sum = 0;
avg = sum/4;
printf("Welcome to the Sears kilometers per liter calculator.\n\n");
for(i=1;i<=4;i++)
{
printf("\n\nEnter the number of kilometer for tank %d#: ",i);
scanf("%d", &km);
printf("Enter the number of liters used by tank %d#: ",i);
scanf("%f", <);
res = (float)km / lt;
printf("*** The kilometers per liter for tank %d# is %.1f", i, res);
sum = sum + res;
}
printf("Your overall average kilometers per liter for 4 tanks is %.1f", avg);
printf("\n\nThanks for using the Sears KPL calculator program.");
getchar();
}