#include
struct student
{
char name[50];
int roll;
float marks;
int mcs011, mcs012, mcs013, mcs014, mcs015, mcsl016, mcsl017;
int mcs011_assign, mcs012_assign, mcs013_assign, mcs014_assign, mcs015_assign, mcsl016_assign, mcsl017_assign;
};
int main(void)
{
struct student s[20];
for (int i = 0; i < 2; i++) {
printf("n***** Enter information of student %d *****n", i+1);
printf("Name of the student: ");
scanf("%s",s[i].name);
printf("Roll number: ");
scanf("%d", &s[i].roll);
#include
struct student
{
char name[50];
int roll;
float marks;
int mcs011, mcs012, mcs013, mcs014, mcs015, mcsl016, mcsl017;
int mcs011_assign, mcs012_assign, mcs013_assign, mcs014_assign, mcs015_assign, mcsl016_assign, mcsl017_assign;
};
int main(void)
{
struct student s[20];
for (int i = 0; i < 2; i++) {
printf("n***** Enter information of student %d *****n", i+1);
printf("Name of the student: ");
scanf("%s",s[i].name);
printf("Roll number: ");
scanf("%d", &s[i].roll);
printf("nn***Enter Term End Theory Matks***nn");
printf("MCS-011 marks: ");
scanf("%d", &s[i].mcs011);
printf("MCS-012 marks: ");
scanf("%d", &s[i].mcs012);
printf("MCS-013 marks: ");
scanf("%d", &s[i].mcs013);
printf("MCS-014 marks: ");
scanf("%d", &s[i].mcs014);
printf("MCS-015 marks: ");
scanf("%d", &s[i].mcs015);
printf("MCSL-016 marks: ");
scanf("%d", &s[i].mcsl016);
printf("MCSL-017 marks: ");
scanf("%d", &s[i].mcsl017);
printf("nn***Enter Assignment Marks***nn");
printf("MCS-011 marks: ");
scanf("%d", &s[i].mcs011_assign);
printf("MCS-012 marks: ");
scanf("%d", &s[i].mcs012_assign);
printf("MCS-013 marks: ");
scanf("%d", &s[i].mcs013_assign);
printf("MCS-014 marks: ");
scanf("%d", &s[i].mcs014_assign);
printf("MCS-015 marks: ");
scanf("%d", &s[i].mcs015_assign);
printf("MCSL-016 marks: ");
scanf("%d", &s[i].mcsl016_assign);
printf("MCSL-017 marks: ");
scanf("%d", &s[i].mcsl017_assign);
}
for (int i = 0; i < 2; i++) {
printf("n*****Displaying Grade Card Data*****n");
printf("Name : %s t", s[i].name);
printf("Roll number: %d n",s[i].roll);
printf("Subjects :t");
printf("MCS-011 t");
printf("MCS-012 t");
printf("MCS-013 t");
printf("MCS-014 t");
printf("MCS-015 t");
printf("MCSL-016 t");
printf("MCSL-017 n");
printf("Assignment :t");
printf("%d tt", s[i].mcs011_assign );
printf("%d tt", s[i].mcs012_assign );
printf("%d tt", s[i].mcs013_assign );
printf("%d tt", s[i].mcs014_assign );
printf("%d tt", s[i].mcs015_assign );
printf("%d tt", s[i].mcsl016_assign );
printf("%d n", s[i].mcsl017_assign );
printf("Theory :t");
printf("%d tt", s[i].mcs011 );
printf("%d tt", s[i].mcs012 );
printf("%d tt", s[i].mcs013 );
printf("%d tt", s[i].mcs014 );
printf("%d tt", s[i].mcs015 );
printf("%d tt", s[i].mcsl016 );
printf("%d n", s[i].mcsl017 );
printf("Total :tt");
printf("%.2f tt", (s[i].mcs011 * 0.75) + (s[i].mcs011_assign * 0.25) );
printf("%.2f tt", (s[i].mcs012 * 0.75) + (s[i].mcs012_assign * 0.25) );
printf("%.2f tt", (s[i].mcs013 * 0.75) + (s[i].mcs013_assign * 0.25) );
printf("%.2f tt", (s[i].mcs014 * 0.70) + (s[i].mcs014_assign * 0.30) );
printf("%.2f tt", (s[i].mcs015 * 0.70) + (s[i].mcs015_assign * 0.30) );
printf("%.2f tt", (s[i].mcsl016 * 0.70) + (s[i].mcsl016_assign * 0.30) );
printf("%.2f n", (s[i].mcsl017 * 0.70) + (s[i].mcsl017_assign * 0.30) );
}
}
#include
#include
struct gradeCard{
int enroll ;
char course[5][10] ;
int theory[5] ;
int asgmt[5] ;
int wgTheory[5] ;
int wgAsgmt[5] ;
char status[5][15] ;
}std[20] ;
void main(){
int i, j ;
for(i=0; i<20; i++){
printf("nnEnter student data…n") ;
printf("Student %d :-n",i+1) ;
printf("Enrollment No.:t") ;
scanf("%dn",&std[i].enroll) ;
strcpy(std[i].couorse[0],"FEG02") ;
strcpy(std[i].couorse[1],"ECO01") ;
strcpy(std[i].couorse[2],"BCS011") ;
strcpy(std[i].couorse[3],"BCS012") ;
strcpy(std[i].couorse[4],"BCSL013") ;
for(j=0; j<5; j++){
printf("%s theory marks:t",std[i].course[j]) ;
scanf("%dn",&std[i].theory[j]) ;
printf("%s asgmt marks:t",std[i].course[j]) ;
scanf("%dn",&std[i].asgmt[j]) ;
std[i].wgTheory[j] = 0.75*std[i].theory[j] ;
std[i].wgAsgmt[j] = 0.25*std[i].asgmt[j] ;
if((std[i].wgTheory[j]+std[i].wgAsgmt[j])<40)
strcpy(std[i].status[j],"Not Completed") ;
else
strcpy(std[i].status[j],"Completed") ;
}
}
printf("Data Entry Completed…n") ;
printf("Press Enter.") ;
getch() ;
clrscr() ;
printf("See grade card one by one…nn") ;
for(int i=0; i<20; i++){
printf("Enrollment No. :t%dnn", std[i].enroll) ;
printf("SubjecttTheorytAsgmttwgTheorytwgAsgmttStatusn") ;
for(j=0; j<5; j++){
printf("%st%dt%dt%dt%dt%sn", std[i].course[j], std[i].theory[j], std[i].asgmt[j], std[i].wgTheory[j], std[i].wgAsgmt[j], std[i].status[j]) ;
}
getch() ;
clrscr() ;
printf("nn") ;
}
printf("THE END…") ;
}