C program that accepts marks in 5 subjects and outputs average marks

Program

#include<stdio.h>
#include<conio.h>

void main()
{
int a,b,c,d,e,average;
clrscr();

printf(“Enter marks of subject 1:”);
scanf(“%d”,&a);
printf(“Enter marks of subject 2:”);
scanf(“%d”,&b);
printf(“Enter marks of subject 3:”);
scanf(“%d”,&c);
printf(“Enter marks of subject 4:”);
scanf(“%d”,&d);
printf(“Enter marks of subject 5:”);
scanf(“%d”,&e);

average=(a+b+c+d+e)/5;
printf(“nAverage=%d”,average);
getch();
}

Output

C program that accepts marks in 5 subjects and outputs average marks output

DURGESH

I Love python, so I like machine learning a Lot and on the other hand, I like building apps and fun games I post blogs on my website for Tech enthusiast to learn and Share Information With The World.

Leave a Reply

Your email address will not be published. Required fields are marked *

fourteen − 3 =

Recent Content