3/17/21

C Program to find the average marks of 5 subjects -- C Programming


Program To Find Average of 5 Subjects


 #include<stdio.h>

int main()

{

int a, b, c, d, e, sum;

float ave;

printf("Enter Marks of Subjects 1 =");

scanf("%d",&a);

printf("Enter Marks of Subjects 2 =");

scanf("%d",&b);

printf("Enter Marks of Subjects 3 =");

scanf("%d",&c);

printf("Enter Marks of Subjects 4 =");

scanf("%d",&d);

printf("Enter Marks of Subjects 5 =");

scanf("%d",&e);

sum = a+b+c+d+e;

ave = sum/5;

printf("\nSum of the Marks are :- %d ", sum);

printf("Average of the Marks are :- %f", ave);

getch();

}

Output :- 





1 comment:

  1. I wanna thanks to a great extent for providing such informative and qualitative material therefore often.
    professional web design agency

    ReplyDelete

Like us on facebook

blogger templatesblogger widgets

Follow on Twitter

Linkedin

Categories

Mad About Computer. Powered by Blogger.