#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();
}
printf("nAverage=%d",average); in this step "=" sign is wrong
@Saurabh
There is no problem bro, the program is working fine. You can see the screenshot of the output
this can be made within an array