Input 3 Integer and Find The Average of Them

#include "stdio.h"
int main (void)
{
    int a,b,c, average;    printf("Please enter the 1st age\n");
    scanf("%d", &a);
    printf("Please enter the 2nd age\n");
    scanf("%d", &b);
    printf("Please enter the 3rd age\n");
    scanf("%d", &c);
    average=(a+b+c)/3;
    printf("The average of their age:%d\7\n", average);
    return 0;
}

0 comments:

Post a Comment