Array student result programme in c
Array student result programme in c :
#include
main()
{
int ft[40]={41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80};
int st[40]={80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41};
int fm[40]={41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61};
int i,marks,count;;
double tm[40];
for(i=0;i<40 br="" i=""> tm[i]=ft[i]/4+st[i]/4+fm[i]/2;
}
for(i=1;i<=40;i++){
printf("Roll No:%d<-------> Total mark:%.0lf\n",i,tm[i-1]);
}------->40>
}
Output:
#include
main()
{
int ft[40]={41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80};
int st[40]={80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41};
int fm[40]={41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61};
int i,marks,count;;
double tm[40];
for(i=0;i<40 br="" i=""> tm[i]=ft[i]/4+st[i]/4+fm[i]/2;
}
for(i=1;i<=40;i++){
printf("Roll No:%d<-------> Total mark:%.0lf\n",i,tm[i-1]);
}------->40>
Comments
Post a Comment