
please wait
printf("the sum is %d and the average is %d",sum,avg);
%d
means int but you're passing a float
PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code. Along with the proper indenting it makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ Hint: You can edit your post, highlight your code and press the <> formatting button. You can use the preview button at the bottom to see how it looks. I found the second link to be the most help. |
|
|
void main()
you must have a very old compiler. These days int main()
is the correct way to write this line. Also I compiled the program as a C++ program with VS2017 and that might make some difference.