#include <stdio.h> int main() { int q[5], average, total; printf("Enter 5 quiz scores:"); for (int i=0; i<=4; i++) { scanf("%d", &q[i]); total= total+q[i]; } average=total/5; printf("The average is %d", average); return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter