Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- #include<conio.h>
- #include<string.h>
- typedef char string50[51];
- typedef char string08[9];
- typedef struct
- { string50 strName;
- string08 strID;
- float fQuiz[3];
- float fFinalExam;
- float fRawScore;
- float fFinalGrade;
- float fAveQ, fAveMP;
- } STUDENT_RECORD;
- typedef STUDENT_RECORD_CLASS_RECORD[5];
- #define NAME 1
- #define ID 2
- #define QUIZ1 3
- #define QUIZ2 4
- #define QUIZ3 5
- #define MP1 6
- #define MP2 7
- #define FE 8
- //initializes the content of class record to null & 0 void initialize (CLASS_RECORD c)
- {
- int i, j;
- for (i = 0; i < 5; i++)
- { strcpy (c[i]. strName, "");
- strcpy([i]. strID, "");
- for (j = 0; j < 3; j++)
- { c[i].fQuiz[j] = 0;
- }
- for (j = 0; j < 2; j++)
- { c[i]. fMacProb[j] = 0;
- }
- c[i].fFinalExam = 0;
- c[i].fRawScore = 0;
- c[i].fFinalGrade = 0;
- // displays the main menu void displayOption()
- { cout<<"\n *****************************";
- cout<<"\n [1] Add Record";
- cout<<"\n [2] View Student Record";
- cout<<"\n [3] Modify Student Record ";
- cout<<"\n [4] View Class Record";
- cout<<"\n [5] EXIT";
- cout<<"\n *****************************";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement