Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. #include<iostream.h>
  2. #include<conio.h>
  3. #include<string.h>
  4.  
  5. typedef char string50[51];
  6. typedef char string08[9];
  7.  
  8. typedef struct
  9. { string50 strName;
  10. string08 strID;
  11. float fQuiz[3];
  12. float fFinalExam;
  13. float fRawScore;
  14. float fFinalGrade;
  15. float fAveQ, fAveMP;
  16.  
  17. } STUDENT_RECORD;
  18.  
  19. typedef STUDENT_RECORD_CLASS_RECORD[5];
  20.  
  21. #define NAME 1
  22. #define ID 2
  23. #define QUIZ1 3
  24. #define QUIZ2 4
  25. #define QUIZ3 5
  26. #define MP1 6
  27. #define MP2 7
  28. #define FE 8
  29.  
  30. //initializes the content of class record to null & 0 void initialize (CLASS_RECORD c)
  31. {
  32. int i, j;
  33. for (i = 0; i < 5; i++)
  34. { strcpy (c[i]. strName, "");
  35. strcpy([i]. strID, "");
  36.  
  37. for (j = 0; j < 3; j++)
  38. { c[i].fQuiz[j] = 0;
  39. }
  40.  
  41. for (j = 0; j < 2; j++)
  42. { c[i]. fMacProb[j] = 0;
  43. }
  44.  
  45. c[i].fFinalExam = 0;
  46. c[i].fRawScore = 0;
  47. c[i].fFinalGrade = 0;
  48.  
  49. // displays the main menu void displayOption()
  50. { cout<<"\n *****************************";
  51. cout<<"\n [1] Add Record";
  52. cout<<"\n [2] View Student Record";
  53. cout<<"\n [3] Modify Student Record ";
  54. cout<<"\n [4] View Class Record";
  55. cout<<"\n [5] EXIT";
  56. cout<<"\n *****************************";
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement