Advertisement
Guest User

TARIQ'S SHENANIGANS

a guest
Jan 20th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.09 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';
  198. 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");
  199. scanf("%d", &choice);
  200. switch (choice)
  201. {
  202. case 1:
  203. {
  204. do
  205. {
  206. printf("\nPlease enter the student's serial number:\n");
  207. scanf("%d", &serialnum);
  208. printf("\nPlease enter the student's ID:\n"); //could be name later if I felt like it
  209. scanf("%d", SInfo[serialnum][0]);
  210. printf("\nPlease enter the student's age:\n");
  211. scanf("%d", SInfo[serialnum][1]);
  212. printf("\nPlease enter the student's gender: (1 for Male/ 0 for Female)\n");
  213. scanf("%d", SInfo[serialnum][2]);
  214. printf("\nPlease enter the student's address:\n"); //it's gonna be a string later on just adding headlines
  215. scanf("%d", SInfo[serialnum][3]);
  216. printf("\nPlease enter the student's telephone number:\n");
  217. scanf("%d", SInfo[serialnum][4]);
  218. printf("please enter this student's fees' payment:\n");
  219. scanf("%d", SInfo[serialnum][5]);
  220. printf("\nWould you like to modify another student's information? (Y/N)\n");
  221. scanf("\n%c", &modifyagain);
  222. }
  223. while(modifyagain == 'Y' || modifyagain == 'y');
  224. break;
  225. }
  226. case 2:
  227. {
  228. do
  229. {
  230. printf("\nPlease enter the teacher's serial number:\n");
  231. scanf("%d", &serialnum);
  232. printf("\nPlease enter the teacher's ID:\n"); //could be name later if I felt like it
  233. scanf("%d", TInfo[serialnum][0]);
  234. printf("\nPlease enter the teacher's age:\n");
  235. scanf("%d", TInfo[serialnum][1]);
  236. printf("\nPlease enter the teacher's gender: (1 for Male/ 0 for Female)\n");
  237. scanf("%d", TInfo[serialnum][2]);
  238. printf("\nPlease enter the teacher's Educational Level:\n"); //it's gonna be a string later on just adding headlines
  239. scanf("%d", TInfo[serialnum][3]);
  240. printf("\nPlease enter the teacher's telephone number:\n");
  241. scanf("%d", TInfo[serialnum][4]);
  242. printf("\nPlease enter the teacher's Specialist address:\n");
  243. scanf("%d", TInfo[serialnum][5]);
  244. printf("\nPlease enter the teacher's university:\n"); //it's gonna be a string
  245. scanf("%d", TInfo[serialnum][6]);
  246. printf("\nWould you like to modify another teacher's information?\n");
  247. scanf("\n%c", &modifyagain);
  248. }
  249. while(modifyagain == 'Y' || modifyagain == 'y');
  250. break;
  251. }
  252. case 3:
  253. {
  254. do
  255. {
  256. printf("\nPlease enter which KG class would you like to modify: (1/2/3)\n");
  257. scanf("%d", &classnum);
  258. printf("\nPlease enter KG%d's teacher's ID:\n",classnum); //might make it a string
  259. scanf("%d", CInfo[classnum-1][0]);
  260. printf("\nPlease enter KG%d's location:\n", classnum);
  261. scanf("%d", CInfo[classnum-1][1]);
  262. printf("\nPlease enter KG%d's number of students:\n", classnum);
  263. scanf("%d", CInfo[classnum-1][2]);
  264. printf("\nWould you like to modify another class' information?\n");
  265. scanf("\n%c", &modifyagain);
  266. }
  267. while(modifyagain == 'Y' || modifyagain == 'y');
  268. break;
  269. }
  270. case 4:
  271. {
  272. while(1)
  273. {
  274. printf("\nPlease enter the serial number of the teacher you want to modify his/her assessment: (from the assessment table)\n");
  275. scanf("%d", &serialnum);
  276. 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
  277. scanf("%d", TAssessment[serialnum][0]);
  278. printf("\nPlease rate his/her teaching skills: ( ? / 10 )\n");
  279. scanf("%d", TAssessment[serialnum][1]);
  280. printf("\nPlease rate his/her preparation for class: ( ? / 10 )\n");
  281. scanf("%d", TAssessment[serialnum][2]);
  282. printf("\nPlease rate his/her interaction with students: ( ? / 10 )\n");
  283. scanf("%d", TAssessment[serialnum][3]);
  284. printf("\nPlease rate his/her use of technology in teaching: ( ? / 10 )\n");
  285. scanf("%d", TAssessment[serialnum][4]);
  286. printf("\nPlease rate his/her attendance: ( ? / 10 )\n");
  287. scanf("%d", TAssessment[serialnum][5]);
  288. scanf("\n%c", &othernotes);
  289. if(othernotes == 'Y' || othernotes == 'y')
  290. {
  291. printf("\nPlease enter your notes with each word separated with an underscore");
  292. scanf("%s", TNotes[serialnum]); // Not sure how this works I'll leave it to you saif
  293. }
  294. else
  295. {
  296. printf("\n\nWould you like to modify another assessment for a teacher? (Y/N)\n");
  297. scanf("\n%c", &modifyagain);
  298. if(modifyagain == 'Y' || modifyagain == 'y')
  299. {
  300. continue;
  301. }
  302. else if(modifyagain == 'N' || modifyagain == 'n')
  303. break;
  304. }
  305. }
  306. break;
  307. }
  308. case 5:
  309. {
  310. while(1)
  311. {
  312. printf("\nPlease enter the serial number of the student you want to modify his/her assessment: (from the assessment table)\n");
  313. scanf("%d", &serialnum);
  314. 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
  315. scanf("%d", SAssessment[serialnum][0]);
  316. printf("\nPlease rate his/her attendance: ( ? / 10 )\n");
  317. scanf("%d", SAssessment[serialnum][1]);
  318. printf("\nPlease rate his/her reading level: ( ? / 10 )\n");
  319. scanf("%d", SAssessment[serialnum][2]);
  320. printf("\nPlease rate his/her writing level: ( ? / 10 )\n");
  321. scanf("%d", SAssessment[serialnum][3]);
  322. printf("\nPlease rate his/her participation level: ( ? / 10 )\n");
  323. scanf("%d", SAssessment[serialnum][4]);
  324. printf("\nPlease enter his/her IQ result:\n");
  325. scanf("%d", SAssessment[serialnum][5]);
  326. printf("\nPlease rate his/her cleaning skills:\n");
  327. scanf("%d", SAssessment[serialnum][6]);
  328. printf("\nPlease rate his/her leadership skills:\n");
  329. scanf("%d", SAssessment[serialnum][7]);
  330. printf("\nOther Notes?: (Y/N)\n");
  331. scanf("\n%c", &othernotes);
  332. if(othernotes == 'Y' || othernotes == 'y')
  333. {
  334. printf("\nPlease enter your notes with each word separated with an underscore");
  335. scanf("%s", SNotes[serialnum]);
  336. }
  337. else
  338. {
  339. printf("\n\nWould you like to modify another assessment for a student? (Y/N)\n");
  340. scanf("\n%c", &modifyagain);
  341. if(modifyagain == 'Y' || modifyagain == 'y')
  342. {
  343. continue;
  344. }
  345. else if(modifyagain == 'N' || modifyagain == 'n')
  346. break;
  347. }
  348. }
  349. break;
  350. }
  351. default:
  352. {
  353. printf("\nInvalid input.\n\n");
  354. continue;
  355. }
  356. }
  357. }
  358. 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])
  359. {
  360. int choice; int serialnum; char delagain = 'a';
  361. 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");
  362. scanf("%d", &choice);
  363. switch (choice)
  364. {
  365. case 1:
  366. {
  367. do
  368. {
  369. printf("\nPlease enter the student's serial number:\n");
  370. scanf("%d", &serialnum);
  371. for(int i = 0; i < 6; i++)
  372. {
  373. 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
  374. }
  375. printf("/nWould you like to delete anything else? (Y/N)\n");
  376. scanf("\n%c", &delagain);
  377. }
  378. while(delagain == 'Y' || delagain == 'y');
  379. break;
  380. }
  381. case 2:
  382. {
  383. do
  384. {
  385. printf("\nPlease enter the teacher's serial number:\n");
  386. scanf("%d", &serialnum);
  387. for(int i = 0; i < 7; i++)
  388. {
  389. TInfo[serialnum][i] = 0;
  390. }
  391. printf("/nWould you like to delete anything else? (Y/N)\n");
  392. scanf("\n%c", &delagain);
  393. }
  394. while(delagain == 'Y' || delagain == 'y');
  395. break;
  396. }
  397. case 3:
  398. {
  399. do
  400. {
  401. printf("\nPlease enter the KG class' number: (1/2/3)\n");
  402. scanf("%d", &serialnum);
  403. for(int i = 0; i < 3; i++)
  404. {
  405. CInfo[serialnum][i] = 0;
  406. }
  407. printf("/nWould you like to delete anything else? (Y/N)\n");
  408. scanf("\n%c", &delagain);
  409. }
  410. while(delagain == 'Y' || delagain == 'y');
  411. break;
  412. }
  413. case 4:
  414. {
  415. do
  416. {
  417. printf("\nPlease enter the teacher's serial number:\n");
  418. scanf("%d", &serialnum);
  419. for(int i = 0; i < 7; i++)
  420. {
  421. TInfo[serialnum][i] = 0;
  422. TNotes[serialnum] = '&';
  423. }
  424. printf("/nWould you like to delete anything else? (Y/N)\n");
  425. scanf("\n%c", &delagain);
  426. }
  427. while(delagain == 'Y' || delagain == 'y');
  428. break;
  429. }
  430. case 5:
  431. {
  432. do
  433. {
  434. printf("\nPlease enter the student's serial number:\n");
  435. scanf("%d", &serialnum);
  436. for(int i = 0; i < 8; i++)
  437. {
  438. SInfo[serialnum][i] = 0;
  439. SNotes[i] = '&';
  440. }
  441. printf("/nWould you like to delete anything else? (Y/N)\n");
  442. scanf("\n%c", &delagain);
  443. }
  444. while(delagain == 'Y' || delagain == 'y');
  445. break;
  446. }
  447. default:
  448. {
  449. printf("\nInvalid input.\n\n");
  450. continue;
  451. }
  452. }
  453. }
  454. void assessmentteacher(int TAssessment[100][6], char TNotes[256][256])
  455. {
  456. int serialnum;
  457. printf("\nPlease enter the serial number for the teacher you want to print the assessment for:\n");
  458. scanf("%d", &serialnum);
  459. printf("\n\nName\tTeaching Skills\tPreperation for class\tInteraction with students\tUsing technology in teaching\tAttendence\tOther Notes\n");
  460. for(int i = 0; i < 6; i++)
  461. {
  462. printf("%d\t", TAssessment[serialnum][i]);
  463. }
  464. printf("%s\n", TNotes);
  465. }
  466. void assessmentstudent(int SAssessment [100][8], char SNotes[256][256])
  467. {
  468. int serialnum;
  469. printf("\nPlease enter the serial number for the student you want to print the assessment for:\n");
  470. scanf("%d", &serialnum);
  471. printf("\n\nName\tAttendence Level\tReading Level\tWriting Level\tParticipation Level\tIQ Result\tCleaning Skills\tLeadership Skills\tOther Notes\n");
  472. for(int i = 0; i < 8; i++)
  473. {
  474. printf("%d\t", SAssessment[serialnum][i]);
  475. }
  476. printf("%s\n", SNotes);
  477. }
  478. int searchstudent(int SInfo[100][6])
  479. {
  480. int SID; int address;
  481. printf("\nPlease enter the teacher's ID number:\n");
  482. scanf("%d", &SID);
  483. for(int i = 0; i < 100; i++)
  484. {
  485. if(SID == SInfo[i][1])
  486. return i;
  487. }
  488. }
  489. int searchteacher(int TInfo[100][7])
  490. {
  491. int TID; int address;
  492. printf("\nPlease enter the teacher's ID number:\n");
  493. scanf("%d", &TID);
  494. for(int i = 0; i < 100; i++)
  495. {
  496. if(SID == TInfo[i][1])
  497. return i;
  498. }
  499. void login(char user[256], char pass[256])
  500. {
  501. while (1)
  502. {
  503. printf("Please enter your username:\n");
  504. scanf("%s", user);
  505. if(user != 'admin')
  506. {
  507. printf("Invalid Username!\n");
  508. continue;
  509. }
  510. else if(user == 'admin')
  511. {
  512. break;
  513. }
  514. }
  515. while(1)
  516. {
  517. printf("\nPlease enter your password:\n");
  518. scanf("%s", pass);
  519. if(pass != '12321')
  520. {
  521. printf("Invalid Password!\n");
  522. continue;
  523. }
  524. else if(pass == '12321')
  525. {
  526. admin();
  527. }
  528. }
  529. }
  530. void admin()
  531. {
  532. int StudentInfo[100][6], TeacherInfo[100][7], classinfo[3][3], studentassessment[100][8], teacherassessment[100][6]; //char StName[256][256]
  533. int choice; char delchoice = 'a'; char search = 'a'; char searchagain = 'a'; char assessment = 'a';
  534. char assessmentagain = 'a'; char paymentchoice = 'a'; char redo = 'a';
  535. char SNotes[256][256]; char TNotes[256][256];
  536. int searchresult; char tables = 'a';
  537. while(1)
  538. {
  539. 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");
  540. scanf("%d", &choice);
  541. if(choice == 1)
  542. {
  543. printf("\nWhat would you like to do? (A/M/D)\n");
  544. scanf("\n%c", &delchoice);
  545. if(delchoice == 'A' || delchoice == 'a')
  546. {
  547. add(StudentInfo, TeacherInfo, classinfo, studentassessment, teacherassessment, SNotes, TNotes);
  548. }
  549. else if(delchoice == 'M' || delchoice == 'm')
  550. {
  551. modify(StudentInfo, TeacherInfo, classinfo, studentassessment, teacherassessment, SNotes, TNotes);
  552. }
  553. else if(delchoice == 'D' || delchoice == 'd')
  554. {
  555. delete(StudentInfo, TeacherInfo, classinfo, studentassessment, teacherassessment, SNotes, TNotes);
  556. }
  557. }
  558. else if(choice == 2)
  559. {
  560. do
  561. {
  562. printf("\nWhat would you like to search for? (S/T)\n");
  563. scanf("\n%c", &search);
  564. if(search == 'S' || search == 's')
  565. {
  566. searchresult = searchstudent(StudentInfo);
  567. printf("\nThis student's serial number is %d\n", searchresult);
  568. }
  569. else if(search == 'T' || search == 't')
  570. {
  571. searchresult = searchteacher(TeacherInfo);
  572. printf("\nThis teacher's serial number is %d\n", searchresult);
  573. }
  574. printf("\nWould you like to search for anything else? (Y/N)\n");
  575. scanf("\n%c", &searchagain);
  576. }
  577. while(searchagain == 'Y' || searchagain == 'y');
  578. }
  579. else if(choice == 3)
  580. {
  581. do
  582. {
  583. printf("\nWho would you like to print the assessment for? (S/T)\n");
  584. scanf("\n%c", &assessment);
  585. if(assessment == 'S' || assessment == 's')
  586. {
  587. assessmentstudent(studentassessment);
  588. }
  589. else if(assessment == 'T' || assessment == 't')
  590. {
  591. assessmentteacher(teacherassessment, TNotes);
  592. }
  593. printf("\nWould you like to print another assessment? (Y/N)\n");
  594. scanf("\n%c", &assessmentagain);
  595. }
  596. while(assessmentagain == 'y' || assessmentagain 'Y');
  597. }
  598. else if(choice == 4)
  599. {
  600. do
  601. {
  602. payment(StudentInfo);
  603. printf("\nWould you like to print the payment info for another student? (Y/N)\n");
  604. scanf("\n%c", &paymentchoice);
  605. }
  606. while(paymentchoice == 'Y' || paymentchoice == 'y');
  607. }
  608. printf("\nWould you like to do anything else? (Y/N)\n");
  609. scanf("\n%c", &redo);
  610. if(redo == 'Y' || redo == 'y')
  611. continue;
  612. else
  613. {
  614. printf("\nWould you like to print the tables? (Y/N)\n");
  615. scanf("\n%c", &tables);
  616. if(tables == 'Y' || tables == 'y')
  617. {
  618. printf("\nThe students information table:\n\n");
  619. printf("ID\tAge\tGender\tAddress\tTelephone No.\tFee's Payment\n");
  620. for(int i = 0; i < 100; i++)
  621. {
  622. for(int j = 0; j < 6; j++)
  623. {
  624. printf("%d\t", StudentInfo[i][j]);
  625. }
  626. printf("\n");
  627. }
  628. printf("\n\nThe Teachers information table:\n\n");
  629. printf("ID\tAge\tGender\tEducational Level\tUniversity\tSpecialist Address\tTelephone No.\n");
  630. for(int i = 0; i < 100; i++)
  631. {
  632. for(int j = 0; j < 7; j++)
  633. {
  634. printf("%d\t", TeacherInfo[i][j]);
  635. }
  636. printf("\n");
  637. }
  638. }
  639. else
  640. break;
  641. }
  642. }
  643. return;
  644. }
  645. int main()
  646. {
  647. char user[256]; char pass[256];
  648. login(user, pass);
  649. return 0;
  650. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement