Well, I'm in college and I should know this by now, but i've been slacking all day. I have my final exam for C programming in a week and I am not really confident about it (since i only started studing this 2 days ago). Nevertheless, I am watching youtube tutorials and in case it doesn't go well i have in about a 2 weeks an extra exam to boost my grade. It should not be difficult since it's the first semester of the first year of college but one does never know. By the way by a "modern compiler" I think you are refering to the program i use in C and it's codeblocks. The original code was :
Code:
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int main(void) {
float notes[5] = {0};
float total = 0;
float average;
float i=0;
printf(" Type the scores :\n");
for (i=0; i<5; ++i){
scanf("%f", ¬es[i]);
}
for (i=0; i<5; ++i){
total += notes[i];
}
average = total /5;
printf(" %f", average);
return 0;
}