Embed presentation
Download to read offline
![#include<stdio.h>
#include<conio.h>
main()
{
int s[5][5],sum[7][7];
int i,j=1,sums=0,l=1,num;
float add;
clrscr();
printf("Enter no of students required");
scanf("%d",&num);
for(l=1;l<=num;l++)
{
printf("enter the marks of the %d student",l);
for(i=1;i<=4;i++)
{
sums=0;
printf("in the %d year",i);
for(j=1;j<=5;j++)
{
scanf("%d",&s[i][j]);
sums+=s[i][j];
}
if(l==1)
sum[l][i]=sums;
else if(l==2)
sum[l][i]=sums;
else if(l==3)
sum[l][i]=sums;
else if(l==4)
sum[l][i]=sums;
}
}
for(l=1;l<=num;l++)
{
for(i=1;i<=4;i++)
{
printf("Marks of the %d student in the %d year is %d and average is
%dn",l,i,sum[l][i],(sum[l][i]/4));
}
}
for(l=1;l<=num;l++)
{
for(i=1;i<=4;i++)
{
add=(float)(sum[l][i]);
}
printf("Aggregate of the %d student is %fn",l,(add/4));
}
getch();
}](https://image.slidesharecdn.com/aggregate-160730030828/75/Aggregate-1-2048.jpg)

The document is a C program that calculates and displays the marks and average for a specified number of students over four years. It prompts for student marks, sums them up, and computes both year-wise averages and an overall aggregate. The program uses multidimensional arrays to store and manage the data effectively.
![#include<stdio.h>
#include<conio.h>
main()
{
int s[5][5],sum[7][7];
int i,j=1,sums=0,l=1,num;
float add;
clrscr();
printf("Enter no of students required");
scanf("%d",&num);
for(l=1;l<=num;l++)
{
printf("enter the marks of the %d student",l);
for(i=1;i<=4;i++)
{
sums=0;
printf("in the %d year",i);
for(j=1;j<=5;j++)
{
scanf("%d",&s[i][j]);
sums+=s[i][j];
}
if(l==1)
sum[l][i]=sums;
else if(l==2)
sum[l][i]=sums;
else if(l==3)
sum[l][i]=sums;
else if(l==4)
sum[l][i]=sums;
}
}
for(l=1;l<=num;l++)
{
for(i=1;i<=4;i++)
{
printf("Marks of the %d student in the %d year is %d and average is
%dn",l,i,sum[l][i],(sum[l][i]/4));
}
}
for(l=1;l<=num;l++)
{
for(i=1;i<=4;i++)
{
add=(float)(sum[l][i]);
}
printf("Aggregate of the %d student is %fn",l,(add/4));
}
getch();
}](https://image.slidesharecdn.com/aggregate-160730030828/75/Aggregate-1-2048.jpg)