Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.16 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "stdafx.h"
  3. #pragma warning(disable:4996)
  4. #define MENU "Please select the operation:\n\t0. Exit.\n\t1. " \
  5. "Insert or update student grades.\n\t2. Delete student" \
  6. "information.\n\t3. Print the student with maximal computed" \
  7. "grade.\n\t4. Print all the students with their computed grades.\n\t5. Print the menu.\n"
  8. #define LINE_CAP 200
  9.  
  10. int UpdateStudentList() {
  11.  
  12.  
  13.     return 0;
  14. }
  15.  
  16. int RemoveStudent() {
  17.     return 0;
  18. }
  19.  
  20. void FindTheGeek() {
  21.    
  22. }
  23.  
  24. void PrintEmAll() {
  25.  
  26. }
  27.  
  28.  
  29.  
  30. int main()
  31. {
  32.     int operation;
  33.     char student[51][41][11];
  34.     char tempArray[202];
  35.     printf(MENU);
  36.     scanf("%d", &operation);
  37.     while (operation != 0) {
  38.         switch (operation)
  39.         {
  40.         case 1:
  41.             fgets(tempArray , LINE_CAP, stdin);
  42.             UpdateStudentList()
  43.             break;
  44.         case 2:
  45.             break;
  46.         case 3:
  47.             break;
  48.         case 4:
  49.             break;
  50.         case 5:
  51.             printf(MENU);
  52.             break;
  53.         default:
  54.             printf("Error: unrecognized operation.\n");
  55.             break;
  56.         }
  57.         if ((operation==1)||(operation==2)||(operation==3)||(operation==4)) {
  58.             printf("Select the next operation (insert 5 for complete menu).\n%");
  59.         }
  60.         scanf("%d", &operation);
  61.     }
  62.     getchar();
  63.     return 0;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement