Could someone explain to me why the "scan" function is not working in the following code? What do I do to fix the problem? Thanks!
int main() {
int age, sumage;
float mean;
sumage = 0;
for (int a = 1; a <= 20; a = a + 1) {
printf("Enter age: \n");
scanf("%d", &age);
sumage = sumage + age;
}
mean = sumage/20;
printf("mean = é %f \n" , mean);
return 0;
}