Advertisement
Guest User

Fixup 2

a guest
Jan 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.30 KB | None | 0 0
  1. //The username and the pass for the admin are admin 12321
  2. #include <stdio.h>
  3. void payment(int SInfo[100][6])
  4. {
  5. int serialnum;
  6. printf("\nPlease enter the student's serial number:\n");
  7. scanf("%d", &serialnum);
  8. printf("\nThis student paid %d of his fees.\n", SInfo[serialnum][5]);
  9. }
  10. void add(int SInfo[100][6], int TInfo[100][7], int CInfo[3][3], int TAssessment[100][6], int SAssessment[100][8], char TNotes[256][256], char SNotes[256][256])
  11. {
  12. int choice; int counter = 0; char addagain = 'a'; char redo = 'a'; char othernotes = 'a';
  13. do
  14. {
  15. printf("\nWhat would you like to add?\n1- A student and his/her information.\n2- A teacher and his/her information.\n3- A class' information.\n4- A teacher's assessment.\n5- A student's assessment.\n");
  16. scanf("%d", &choice);
  17. switch (choice)
  18. {
  19. case 1:
  20. {
  21. while(1)
  22. {
  23. printf("\nPlease enter the student's ID:\n"); //could be name later if I felt like it
  24. scanf("%d", &SInfo[counter][0]);
  25. printf("\nPlease enter the student's age:\n");
  26. scanf("%d", &SInfo[counter][1]);
  27. printf("\nPlease enter the student's gender: (1 for Male/ 0 for Female)\n");
  28. scanf("%d", &SInfo[counter][2]);
  29. printf("\nPlease enter the student's address:\n"); //it's gonna be a string later on just adding headlines
  30. scanf("%d", &SInfo[counter][3]);
  31. printf("\nPlease enter the student's telephone number:\n");
  32. scanf("%d", &SInfo[counter][4]);
  33. printf("please enter this student's fees' payment:\n");
  34. scanf("%d", &SInfo[counter][5]);
  35. printf("\n\nWould you like to add another student's information? (Y/N)\n");
  36. scanf("\n%c", &addagain);
  37. if(addagain == 'Y' || addagain == 'y')
  38. {
  39. counter++;
  40. continue;
  41. }
  42. else if(addagain == 'N' || addagain == 'n')
  43. {
  44. if(counter >= 10)
  45. {
  46. counter = 0;
  47. break;
  48. }
  49. else
  50. {
  51. printf("\nInsufficient number of students were added, please add more.\n");
  52. continue;
  53. }
  54. }
  55. }
  56. break;
  57. }
  58. case 2:
  59. {
  60. counter = 0;
  61. while(1)
  62. {
  63. printf("\nPlease enter the teacher's ID:\n"); //could be name later if I felt like it
  64. scanf("%d", &TInfo[counter][0]);
  65. printf("\nPlease enter the teacher's age:\n");
  66. scanf("%d", &TInfo[counter][1]);
  67. printf("\nPlease enter the teacher's gender: (1 for Male/ 0 for Female)\n");
  68. scanf("%d", &TInfo[counter][2]);
  69. printf("\nPlease enter the teacher's Educational Level:\n"); //it's gonna be a string later on just adding headlines
  70. scanf("%d", &TInfo[counter][3]);
  71. printf("\nPlease enter the teacher's telephone number:\n");
  72. scanf("%d", &TInfo[counter][4]);
  73. printf("\nPlease enter the teacher's Specialist address:\n");
  74. scanf("%d", &TInfo[counter][5]);
  75. printf("\nPlease enter the teacher's university:\n"); //it's gonna be a string
  76. scanf("%d", &TInfo[counter][6]);
  77. printf("\n\nWould you like to add another teacher's information? (Y/N)\n");
  78. scanf("\n%c", &addagain);
  79. if(addagain == 'Y' || addagain == 'y')
  80. {
  81. counter++;
  82. continue;
  83. }
  84. else if(addagain == 'N' || addagain == 'n')
  85. break;
  86. }
  87. break;
  88. }
  89. case 3:
  90. {
  91. for(int i = 0; i < 3; i++)
  92. {
  93. printf("\nPlease enter KG%d's teacher's ID:\n",i+1); //might make it a string
  94. scanf("%d", &CInfo[i][0]);
  95. printf("\nPlease enter KG%d's location:\n", i+1);
  96. scanf("%d", &CInfo[i][1]);
  97. printf("\nPlease enter KG%d's number of students:\n", i+1);
  98. scanf("%d", &CInfo[i][2]);
  99. }
  100. break;
  101. }
  102. case 4:
  103. {
  104. counter = 0;
  105. while(1)
  106. {
  107. printf("\nPlease enter the teacher's ID that you want to add the assessment for:\n"); //could be name later if I felt like it
  108. scanf("%d", &TAssessment[counter][0]);
  109. printf("\nPlease rate his/her teaching skills: ( ? / 10 )\n");
  110. scanf("%d", &TAssessment[counter][1]);
  111. printf("\nPlease rate his/her preparation for class: ( ? / 10 )\n");
  112. scanf("%d", &TAssessment[counter][2]);
  113. printf("\nPlease rate his/her interaction with students: ( ? / 10 )\n");
  114. scanf("%d", &TAssessment[counter][3]);
  115. printf("\nPlease rate his/her use of technology in teaching: ( ? / 10 )\n");
  116. scanf("%d", &TAssessment[counter][4]);
  117. printf("\nPlease rate his/her attendance: ( ? / 10 )\n");
  118. scanf("%d", &TAssessment[counter][5]);
  119. printf("\nOther Notes?: (Y/N)\n");
  120. scanf("\n%c", &othernotes);
  121. if(othernotes == 'Y' || othernotes == 'y')
  122. {
  123. printf("\nPlease enter your notes with each word separated with an underscore");
  124. scanf("%s", TNotes[counter]); // Not sure how this works I'll leave it to you saif
  125. }
  126. else
  127. {
  128. printf("\n\nWould you like to add another assessment for a teacher? (Y/N)\n");
  129. scanf("\n%c", &addagain);
  130. if(addagain == 'Y' || addagain == 'y')
  131. {
  132. counter++;
  133. continue;
  134. }
  135. else if(addagain == 'N' || addagain == 'n')
  136. break;
  137. }
  138. }
  139. break;
  140. }
  141. case 5:
  142. {
  143. counter = 0;
  144. while(1)
  145. {
  146. printf("\nPlease enter the student's ID that you want to add the assessment for:\n"); //could be name later if I felt like it
  147. scanf("%d", &SAssessment[counter][0]);
  148. printf("\nPlease rate his/her attendance: ( ? / 10 )\n");
  149. scanf("%d", &SAssessment[counter][1]);
  150. printf("\nPlease rate his/her reading level: ( ? / 10 )\n");
  151. scanf("%d", &SAssessment[counter][2]);
  152. printf("\nPlease rate his/her writing level: ( ? / 10 )\n");
  153. scanf("%d", &SAssessment[counter][3]);
  154. printf("\nPlease rate his/her participation level: ( ? / 10 )\n");
  155. scanf("%d", &SAssessment[counter][4]);
  156. printf("\nPlease enter his/her IQ result:\n");
  157. scanf("%d", &SAssessment[counter][5]);
  158. printf("\nPlease rate his/her cleaning skills:\n");
  159. scanf("%d", &SAssessment[counter][6]);
  160. printf("\nPlease rate his/her leadership skills:\n");
  161. scanf("%d", &SAssessment[counter][7]);
  162. printf("\nOther Notes?: (Y/N)\n");
  163. scanf("\n%c", &othernotes);
  164. if(othernotes == 'Y' || othernotes == 'y')
  165. {
  166. printf("\nPlease enter your notes with each word separated with an underscore");
  167. scanf("%s", SNotes[counter]);
  168. }
  169. else
  170. {
  171. printf("\n\nWould you like to add another assessment for a student? (Y/N)\n");
  172. scanf("\n%c", &addagain);
  173. if(addagain == 'Y' || addagain == 'y')
  174. {
  175. counter++;
  176. continue;
  177. }
  178. else if(addagain == 'N' || addagain == 'n')
  179. break;
  180. }
  181. }
  182. break;
  183. }
  184. default:
  185. {
  186. printf("\nInvalid input.\n\n");
  187. continue;
  188. }
  189. }
  190. printf("\nWould you like to do anything else? (Y/N)\n");
  191. scanf("\n%c", &redo);
  192. }
  193. while(redo == 'Y' || redo == 'y');
  194. }
  195. void modify(int SInfo[100][6], int TInfo[100][7], int CInfo[3][3], int TAssessment[100][6], int SAssessment[100][8], char TNotes[256][256], char SNotes[256][256])
  196. {
  197. int choice; int serialnum; char modifyagain = 'a'; int classnum; char othernotes = 'a'; char redo = 'a';
  198. do
  199. {
  200. printf("\nWhat would you like to modify?\n1- A student and his/her information.\n2- A teacher and his/her information.\n3- A class' information.\n4- A teacher's assessment.\n5- A student's assessment.\n");
  201. scanf("%d", &choice);
  202. switch (choice)
  203. {
  204. case 1:
  205. {
  206. do
  207. {
  208. printf("\nPlease enter the student's serial number:\n");
  209. scanf("%d", &serialnum);
  210. printf("\nPlease enter the student's ID:\n"); //could be name later if I felt like it
  211. scanf("%d", &SInfo[serialnum][0]);
  212. printf("\nPlease enter the student's age:\n");
  213. scanf("%d", &SInfo[serialnum][1]);
  214. printf("\nPlease enter the student's gender: (1 for Male/ 0 for Female)\n");
  215. scanf("%d", &SInfo[serialnum][2]);
  216. printf("\nPlease enter the student's address:\n"); //it's gonna be a string later on just adding headlines
  217. scanf("%d", &SInfo[serialnum][3]);
  218. printf("\nPlease enter the student's telephone number:\n");
  219. scanf("%d", &SInfo[serialnum][4]);
  220. printf("please enter this student's fees' payment:\n");
  221. scanf("%d", &SInfo[serialnum][5]);
  222. printf("\nWould you like to modify another student's information? (Y/N)\n");
  223. scanf("\n%c", &modifyagain);
  224. }
  225. while(modifyagain == 'Y' || modifyagain == 'y');
  226. break;
  227. }
  228. case 2:
  229. {
  230. do
  231. {
  232. printf("\nPlease enter the teacher's serial number:\n");
  233. scanf("%d", &serialnum);
  234. printf("\nPlease enter the teacher's ID:\n"); //could be name later if I felt like it
  235. scanf("%d", &TInfo[serialnum][0]);
  236. printf("\nPlease enter the teacher's age:\n");
  237. scanf("%d", &TInfo[serialnum][1]);
  238. printf("\nPlease enter the teacher's gender: (1 for Male/ 0 for Female)\n");
  239. scanf("%d", &TInfo[serialnum][2]);
  240. printf("\nPlease enter the teacher's Educational Level:\n"); //it's gonna be a string later on just adding headlines
  241. scanf("%d", &TInfo[serialnum][3]);
  242. printf("\nPlease enter the teacher's telephone number:\n");
  243. scanf("%d", &TInfo[serialnum][4]);
  244. printf("\nPlease enter the teacher's Specialist address:\n");
  245. scanf("%d", &TInfo[serialnum][5]);
  246. printf("\nPlease enter the teacher's university:\n"); //it's gonna be a string
  247. scanf("%d", &TInfo[serialnum][6]);
  248. printf("\nWould you like to modify another teacher's information?\n");
  249. scanf("\n%c", &modifyagain);
  250. }
  251. while(modifyagain == 'Y' || modifyagain == 'y');
  252. break;
  253. }
  254. case 3:
  255. {
  256. do
  257. {
  258. printf("\nPlease enter which KG class would you like to modify: (1/2/3)\n");
  259. scanf("%d", &classnum);
  260. printf("\nPlease enter KG%d's teacher's ID:\n",classnum); //might make it a string
  261. scanf("%d", &CInfo[classnum-1][0]);
  262. printf("\nPlease enter KG%d's location:\n", classnum);
  263. scanf("%d", &CInfo[classnum-1][1]);
  264. printf("\nPlease enter KG%d's number of students:\n", classnum);
  265. scanf("%d", &CInfo[classnum-1][2]);
  266. printf("\nWould you like to modify another class' information?\n");
  267. scanf("\n%c", &modifyagain);
  268. }
  269. while(modifyagain == 'Y' || modifyagain == 'y');
  270. break;
  271. }
  272. case 4:
  273. {
  274. while(1)
  275. {
  276. printf("\nPlease enter the serial number of the teacher you want to modify his/her assessment: (from the assessment table)\n");
  277. scanf("%d", &serialnum);
  278. printf("\nPlease enter the teacher's ID that you want to modify the assessment for:\n"); //could be name later if I felt like it
  279. scanf("%d", &TAssessment[serialnum][0]);
  280. printf("\nPlease rate his/her teaching skills: ( ? / 10 )\n");
  281. scanf("%d", &TAssessment[serialnum][1]);
  282. printf("\nPlease rate his/her preparation for class: ( ? / 10 )\n");
  283. scanf("%d", &TAssessment[serialnum][2]);
  284. printf("\nPlease rate his/her interaction with students: ( ? / 10 )\n");
  285. scanf("%d", &TAssessment[serialnum][3]);
  286. printf("\nPlease rate his/her use of technology in teaching: ( ? / 10 )\n");
  287. scanf("%d", &TAssessment[serialnum][4]);
  288. printf("\nPlease rate his/her attendance: ( ? / 10 )\n");
  289. scanf("%d", &TAssessment[serialnum][5]);
  290. scanf("\n%c", &othernotes);
  291. if(othernotes == 'Y' || othernotes == 'y')
  292. {
  293. printf("\nPlease enter your notes with each word separated with an underscore");
  294. scanf("%s", TNotes[serialnum]); // Not sure how this works I'll leave it to you saif
  295. }
  296. else
  297. {
  298. printf("\n\nWould you like to modify another assessment for a teacher? (Y/N)\n");
  299. scanf("\n%c", &modifyagain);
  300. if(modifyagain == 'Y' || modifyagain == 'y')
  301. {
  302. continue;
  303. }
  304. else if(modifyagain == 'N' || modifyagain == 'n')
  305. break;
  306. }
  307. }
  308. break;
  309. }
  310. case 5:
  311. {
  312. while(1)
  313. {
  314. printf("\nPlease enter the serial number of the student you want to modify his/her assessment: (from the assessment table)\n");
  315. scanf("%d", &serialnum);
  316. printf("\nPlease enter the student's ID that you want to modify the assessment for:\n"); //could be name later if I felt like it
  317. scanf("%d", &SAssessment[serialnum][0]);
  318. printf("\nPlease rate his/her attendance: ( ? / 10 )\n");
  319. scanf("%d", &SAssessment[serialnum][1]);
  320. printf("\nPlease rate his/her reading level: ( ? / 10 )\n");
  321. scanf("%d", &SAssessment[serialnum][2]);
  322. printf("\nPlease rate his/her writing level: ( ? / 10 )\n");
  323. scanf("%d", &SAssessment[serialnum][3]);
  324. printf("\nPlease rate his/her participation level: ( ? / 10 )\n");
  325. scanf("%d", &SAssessment[serialnum][4]);
  326. printf("\nPlease enter his/her IQ result:\n");
  327. scanf("%d", &SAssessment[serialnum][5]);
  328. printf("\nPlease rate his/her cleaning skills:\n");
  329. scanf("%d", &SAssessment[serialnum][6]);
  330. printf("\nPlease rate his/her leadership skills:\n");
  331. scanf("%d", &SAssessment[serialnum][7]);
  332. printf("\nOther Notes?: (Y/N)\n");
  333. scanf("\n%c", &othernotes);
  334. if(othernotes == 'Y' || othernotes == 'y')
  335. {
  336. printf("\nPlease enter your notes with each word separated with an underscore");
  337. scanf("%s", SNotes[serialnum]);
  338. }
  339. else
  340. {
  341. printf("\n\nWould you like to modify another assessment for a student? (Y/N)\n");
  342. scanf("\n%c", &modifyagain);
  343. if(modifyagain == 'Y' || modifyagain == 'y')
  344. {
  345. continue;
  346. }
  347. else if(modifyagain == 'N' || modifyagain == 'n')
  348. break;
  349. }
  350. }
  351. break;
  352. }
  353. default:
  354. {
  355. printf("\nInvalid input.\n\n");
  356. continue;
  357. }
  358. printf("\nWould you like to do anything else? (Y/N)\n");
  359. scanf("\n%c", &redo);
  360. }
  361. }
  362. while(redo == 'Y' || redo == 'y');
  363. }
  364. void delete(int SInfo[100][6], int TInfo[100][7], int CInfo[3][3], int TAssessment[100][6], int SAssessment[100][8], char TNotes[256][256], char SNotes[256][256])
  365. {
  366. int choice; int serialnum; char delagain = 'a';
  367. printf("\nWhat would you like to delete?\n1- A student and his/her information.\n2- A teacher and his/her information.\n3- A class' information.\n4- A teacher's assessment.\n5- A student's assessment.\n");
  368. scanf("%d", &choice);
  369. switch (choice)
  370. {
  371. case 1:
  372. {
  373. do
  374. {
  375. printf("\nPlease enter the student's serial number:\n");
  376. scanf("%d", &serialnum);
  377. for(int i = 0; i < 6; i++)
  378. {
  379. SInfo[serialnum][i] = 0; //I replaced the arbitrary symbol with 0 because I don't know how to convert an int array to a character LOL
  380. }
  381. printf("/nWould you like to delete anything else? (Y/N)\n");
  382. scanf("\n%c", &delagain);
  383. }
  384. while(delagain == 'Y' || delagain == 'y');
  385. break;
  386. }
  387. case 2:
  388. {
  389. do
  390. {
  391. printf("\nPlease enter the teacher's serial number:\n");
  392. scanf("%d", &serialnum);
  393. for(int i = 0; i < 7; i++)
  394. {
  395. TInfo[serialnum][i] = 0;
  396. }
  397. printf("/nWould you like to delete anything else? (Y/N)\n");
  398. scanf("\n%c", &delagain);
  399. }
  400. while(delagain == 'Y' || delagain == 'y');
  401. break;
  402. }
  403. case 3:
  404. {
  405. do
  406. {
  407. printf("\nPlease enter the KG class' number: (1/2/3)\n");
  408. scanf("%d", &serialnum);
  409. for(int i = 0; i < 3; i++)
  410. {
  411. CInfo[serialnum][i] = 0;
  412. }
  413. printf("/nWould you like to delete anything else? (Y/N)\n");
  414. scanf("\n%c", &delagain);
  415. }
  416. while(delagain == 'Y' || delagain == 'y');
  417. break;
  418. }
  419. case 4:
  420. {
  421. do
  422. {
  423. printf("\nPlease enter the teacher's serial number:\n");
  424. scanf("%d", &serialnum);
  425. for(int i = 0; i < 7; i++)
  426. {
  427. TInfo[serialnum][i] = 0;
  428. TNotes[serialnum] = '&';
  429. }
  430. printf("/nWould you like to delete anything else? (Y/N)\n");
  431. scanf("\n%c", &delagain);
  432. }
  433. while(delagain == 'Y' || delagain == 'y');
  434. break;
  435. }
  436. case 5:
  437. {
  438. do
  439. {
  440. printf("\nPlease enter the student's serial number:\n");
  441. scanf("%d", &serialnum);
  442. for(int i = 0; i < 8; i++)
  443. {
  444. SInfo[serialnum][i] = 0;
  445. SNotes[i] = '&';
  446. }
  447. printf("/nWould you like to delete anything else? (Y/N)\n");
  448. scanf("\n%c", &delagain);
  449. }
  450. while(delagain == 'Y' || delagain == 'y');
  451. break;
  452. }
  453. default:
  454. {
  455. printf("\nInvalid input.\n\n");
  456. continue;
  457. }
  458. }
  459. }
  460. void assessmentteacher(int TAssessment[100][6], char TNotes[256][256])
  461. {
  462. int serialnum;
  463. printf("\nPlease enter the serial number for the teacher you want to print the assessment for:\n");
  464. scanf("%d", &serialnum);
  465. printf("\n\nName\tTeaching Skills\tPreperation for class\tInteraction with students\tUsing technology in teaching\tAttendence\tOther Notes\n");
  466. for(int i = 0; i < 6; i++)
  467. {
  468. printf("%d\t", TAssessment[serialnum][i]);
  469. }
  470. printf("%s\n", TNotes);
  471. }
  472. void assessmentstudent(int SAssessment [100][8], char SNotes[256][256])
  473. {
  474. int serialnum;
  475. printf("\nPlease enter the serial number for the student you want to print the assessment for:\n");
  476. scanf("%d", &serialnum);
  477. printf("\n\nName\tAttendence Level\tReading Level\tWriting Level\tParticipation Level\tIQ Result\tCleaning Skills\tLeadership Skills\tOther Notes\n");
  478. for(int i = 0; i < 8; i++)
  479. {
  480. printf("%d\t", SAssessment[serialnum][i]);
  481. }
  482. printf("%s\n", SNotes);
  483. }
  484. int searchstudent(int SInfo[100][6])
  485. {
  486. int SID; int address;
  487. printf("\nPlease enter the teacher's ID number:\n");
  488. scanf("%d", &SID);
  489. for(int i = 0; i < 100; i++)
  490. {
  491. if(SID == SInfo[i][1])
  492. return i;
  493. }
  494. }
  495. int searchteacher(int TInfo[100][7])
  496. {
  497. int TID; int address;
  498. printf("\nPlease enter the teacher's ID number:\n");
  499. scanf("%d", &TID);
  500. for(int i = 0; i < 100; i++)
  501. {
  502. if(SID == TInfo[i][1])
  503. return i;
  504. }
  505. void login(char user[256], char pass[256])
  506. {
  507. while (1)
  508. {
  509. printf("Please enter your username:\n");
  510. scanf("%s", user);
  511. if(user != 'admin')
  512. {
  513. printf("Invalid Username!\n");
  514. continue;
  515. }
  516. else if(user == 'admin')
  517. {
  518. break;
  519. }
  520. }
  521. while(1)
  522. {
  523. printf("\nPlease enter your password:\n");
  524. scanf("%s", pass);
  525. if(pass != '12321')
  526. {
  527. printf("Invalid Password!\n");
  528. continue;
  529. }
  530. else if(pass == '12321')
  531. {
  532. admin();
  533. }
  534. }
  535. }
  536. void admin()
  537. {
  538. int StudentInfo[100][6], TeacherInfo[100][7], classinfo[3][3], studentassessment[100][8], teacherassessment[100][6]; //char StName[256][256]
  539. int choice; char delchoice = 'a'; char search = 'a'; char searchagain = 'a'; char assessment = 'a';
  540. char assessmentagain = 'a'; char paymentchoice = 'a'; char redo = 'a';
  541. char SNotes[256][256]; char TNotes[256][256];
  542. int searchresult; char tables = 'a';
  543. while(1)
  544. {
  545. printf("What would you like to do?\n1- Add/Modify/Delete data.\n2- Search for a student or a teacher.\n3- Print assessment report for teacher/student.\n4- Print the payment info of a student.\n");
  546. scanf("%d", &choice);
  547. if(choice == 1)
  548. {
  549. printf("\nWhat would you like to do? (A/M/D)\n");
  550. scanf("\n%c", &delchoice);
  551. if(delchoice == 'A' || delchoice == 'a')
  552. {
  553. add(StudentInfo, TeacherInfo, classinfo, studentassessment, teacherassessment, SNotes, TNotes);
  554. }
  555. else if(delchoice == 'M' || delchoice == 'm')
  556. {
  557. modify(StudentInfo, TeacherInfo, classinfo, studentassessment, teacherassessment, SNotes, TNotes);
  558. }
  559. else if(delchoice == 'D' || delchoice == 'd')
  560. {
  561. delete(StudentInfo, TeacherInfo, classinfo, studentassessment, teacherassessment, SNotes, TNotes);
  562. }
  563. }
  564. else if(choice == 2)
  565. {
  566. do
  567. {
  568. printf("\nWhat would you like to search for? (S/T)\n");
  569. scanf("\n%c", &search);
  570. if(search == 'S' || search == 's')
  571. {
  572. searchresult = searchstudent(StudentInfo);
  573. printf("\nThis student's serial number is %d\n", searchresult);
  574. }
  575. else if(search == 'T' || search == 't')
  576. {
  577. searchresult = searchteacher(TeacherInfo);
  578. printf("\nThis teacher's serial number is %d\n", searchresult);
  579. }
  580. printf("\nWould you like to search for anything else? (Y/N)\n");
  581. scanf("\n%c", &searchagain);
  582. }
  583. while(searchagain == 'Y' || searchagain == 'y');
  584. }
  585. else if(choice == 3)
  586. {
  587. do
  588. {
  589. printf("\nWho would you like to print the assessment for? (S/T)\n");
  590. scanf("\n%c", &assessment);
  591. if(assessment == 'S' || assessment == 's')
  592. {
  593. assessmentstudent(studentassessment, SNotes);
  594. }
  595. else if(assessment == 'T' || assessment == 't')
  596. {
  597. assessmentteacher(teacherassessment, TNotes);
  598. }
  599. printf("\nWould you like to print another assessment? (Y/N)\n");
  600. scanf("\n%c", &assessmentagain);
  601. }
  602. while(assessmentagain == 'y' || assessmentagain 'Y');
  603. }
  604. else if(choice == 4)
  605. {
  606. do
  607. {
  608. payment(StudentInfo);
  609. printf("\nWould you like to print the payment info for another student? (Y/N)\n");
  610. scanf("\n%c", &paymentchoice);
  611. }
  612. while(paymentchoice == 'Y' || paymentchoice == 'y');
  613. }
  614. printf("\nWould you like to do anything else? (Y/N)\n");
  615. scanf("\n%c", &redo);
  616. if(redo == 'Y' || redo == 'y')
  617. continue;
  618. else
  619. {
  620. printf("\nWould you like to print the tables? (Y/N)\n");
  621. scanf("\n%c", &tables);
  622. if(tables == 'Y' || tables == 'y')
  623. {
  624. printf("\nThe students information table:\n\n");
  625. printf("ID\tAge\tGender\tAddress\tTelephone No.\tFee's Payment\n");
  626. for(int i = 0; i < 100; i++)
  627. {
  628. for(int j = 0; j < 6; j++)
  629. {
  630. printf("%d\t", StudentInfo[i][j]);
  631. }
  632. printf("\n");
  633. }
  634. printf("\n\nThe Teachers information table:\n\n");
  635. printf("ID\tAge\tGender\tEducational Level\tUniversity\tSpecialist Address\tTelephone No.\n");
  636. for(int i = 0; i < 100; i++)
  637. {
  638. for(int j = 0; j < 7; j++)
  639. {
  640. printf("%d\t", TeacherInfo[i][j]);
  641. }
  642. printf("\n");
  643. }
  644. }
  645. else
  646. break;
  647. }
  648. }
  649. return;
  650. }
  651. int main()
  652. {
  653. char user[256]; char pass[256];
  654. login(user, pass);
  655. return 0;
  656. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement