#include<stdio.h>
#include<string.h>
#define size 21
#define max 5
int id[max][size];
char ln[max];
int pr[max];
int mt[max];
int fg[max];
void getrecord()
{
int i;
for(i=0;i<=4;i++)
{
clrscr();
printf("id number:");
scanf("%d",id[i]);
printf("last name:");
scanf("%s",ln[i]);
printf("prelim:");
scanf("%d",pr[i]);
printf("midterm:");
scanf("%d",mt[i]);
fg[i]=(pr[i]*0.4)+(mt[i]*0.6);
}
getch();
}
void displayreverse()
{
int i,p;
clrscr();
printf(" idno. lstnme prelim midterm fgrde");
for(i=4;i<=0;i--);
{
p=0;p++;
gotoxy(5,9+p);
printf("%d",id[i]);
gotoxy(5,9+p);
printf("%s",ln[i]);
gotoxy(5,9+p);
printf("%d",pr[i]);
gotoxy(5,9+p);
printf("%d",mt[i]);
gotoxy(5,9+p);
printf("%d",fg[i]);
}
getch();
}
main()
{
getrecord();
displayreverse();
exit(0);
}
comp_sci11 0 Light Poster
comp_sci11 0 Light Poster
WolfPack 491 Posting Virtuoso Team Colleague
dilip.mathews 3 Junior Poster in Training
comp_sci11 0 Light Poster
dilip.mathews 3 Junior Poster in Training
comp_sci11 0 Light Poster
comp_sci11 0 Light Poster
comp_sci11 0 Light Poster
WolfPack 491 Posting Virtuoso Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
comp_sci11 0 Light Poster
WolfPack 491 Posting Virtuoso Team Colleague
comp_sci11 0 Light Poster
WolfPack 491 Posting Virtuoso Team Colleague
dilip.mathews 3 Junior Poster in Training
comp_sci11 0 Light Poster
comp_sci11 0 Light Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.