I had some help writing this program that gives the average rainfall, it says 1 error but there appears to be 3...could someone correct it for me, here is my program and exactly what the compiler said:
#include <stdio.h>;
int main(void)
{
int april = 12, may = 14, june = 8;
printf("The average Rainfall for April is %d april\n", april);
printf("The average Rainfall for May is %d may\n", may);
printf("The average Rainfall for June is %d june\n", june);
printf("The average Rainfall for all three months is %f.\n", ( (float)(april + may + june) / 3) );
}
return 0;
--------------------Configuration: rainfall - Win32 Debug--------------------
Compiling...
rainfall.cpp
c:\documents and settings\arcview1\desktop\rainfall.cpp(1) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
C:\Documents and Settings\arcview1\Desktop\rainfall.cpp(11) : warning C4508: 'main' : function should return a value; 'void' return type assumed
C:\Documents and Settings\arcview1\Desktop\rainfall.cpp(12) : error C2143: syntax error : missing ';' before 'return'
Error executing cl.exe.
rainfall.exe - 1 error(s), 2 warning(s)
thanks for your time and help,
James