SlideShare a Scribd company logo
1 of 1
#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();
}

More Related Content

What's hot

What's hot (13)

Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1
 
SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
SPL 10.1 | Manual Tracing on Basic Loop & 1D ArraySPL 10.1 | Manual Tracing on Basic Loop & 1D Array
SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
 
10 2 배열 응용
10 2 배열 응용10 2 배열 응용
10 2 배열 응용
 
Structure
StructureStructure
Structure
 
programs
programsprograms
programs
 
SPL 11.1 | Problems on Loop , Nested Loop
SPL 11.1 | Problems on Loop , Nested LoopSPL 11.1 | Problems on Loop , Nested Loop
SPL 11.1 | Problems on Loop , Nested Loop
 
Ds
DsDs
Ds
 
Code Diagram
Code DiagramCode Diagram
Code Diagram
 
1 (1)
1 (1)1 (1)
1 (1)
 
Implement a queue using two stacks.
Implement a queue using two stacks.Implement a queue using two stacks.
Implement a queue using two stacks.
 
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3
 
Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2
 
201801 CSE240 Lecture 08
201801 CSE240 Lecture 08201801 CSE240 Lecture 08
201801 CSE240 Lecture 08
 

Recently uploaded

Recently uploaded (20)

Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 

Aggregate

  • 1. #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(); }