Program to compute average of three numbers.

 #include <stdio.h>


int main()

{

    int num1,num2,num3,average;

    printf("enter the value of num1 ");

    scanf("%d",&num1);

    printf("enter the value of num2 ");

    scanf("%d",&num2);

    printf("enter the value of num3 ");

    scanf("%d",&num3);

    average=(num1+num2+num3)/3;

    printf("the average of three numbers is %d",average);

    


    return 0;

}

No comments:

Post a Comment

Programming in C Language

  PROGRAM LIST TO BECOME PRO IN C    😍😍😍            PRACTICE SETS                                                        UNIT -1  👇   IN...