hi,
here is the program:
/*file:avrage.c*/
#include<stdio.h>
/* calculate the average of three numbers */
void main()
{
int num1, num2, num3;
float avg;
printf("enter 3 integer numbers:");
scanf(" %d %d %d ", &num1, &num2, &num3);
avg = num1+num2+num3;
avg = avg/3;
printf("the average is:%f",avg);
}
dumb question: what to do after i entered the numbers in TC++ "run" window? because pressing the "Enter" button does nothing.