बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

C program to calculate sum and average of five number

C program to calculate sum and average of five number

void main()
{
    int a,b,c,d,e,ans; float avg;
    clrscr();
    printf("\nEnter first number=");
    scanf("%d",&a);
    printf("\nEnter second number=");
    scanf("%d",&b);
    printf("\nEnter third number=");
    scanf("%d",&c);
    printf("\nEnter fourth number=");
    scanf("%d",&d);
    printf("\nEnter fifth number=");
    scanf("%d",&e);
    printf("\n\n*********** Result **********");
    ans=a+b+c+d+e;
    printf("\n\nThe sum of entered number is= %d",ans);
    avg=ans/5;
    printf("\n\nThe average of entered number is= %.2f",avg);
    getch();
}


C program to calculate sum and average of five number

C Program example List