int i = 0, sum = 0, subject;
while(i < 5) { scanf("%d", &subject); sum = sum + subject; i++; } printf("%d", sum/5);