Advertisement
asiffff

ProjectAA

Apr 9th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.65 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <windows.h>
  5. #include <conio.h>
  6. double total1=0.00,gpa1=0.00;
  7. struct student
  8. {
  9. int id;
  10. int cla;
  11. long int p_num;
  12. char group[20];
  13. char name[20];
  14. char name1[20];
  15. char gender[20];
  16. double bangla,english,math,reli,physics,chemistry,biology,acconting,economics,finance,sceince,ict,bgs,gpa,total,bwc,cc,ge;
  17. struct student *next,*prev;
  18. }*start=NULL,*end=NULL,*current;
  19.  
  20. void create()
  21. {
  22. char na[20];
  23. if(start==NULL && end==NULL)
  24. {
  25. struct student *new_node;
  26. new_node=(struct student*)malloc(1*sizeof(struct student));
  27. printf("Enter First Name: ");
  28. scanf("%s",&new_node->name);
  29. printf("\nEnter Last Name: ");
  30. scanf("%s",&new_node->name1);
  31. printf("\nEnter Gender: ");
  32. scanf("%s",&new_node->gender);
  33. printf("\nEnter Class: ");
  34. scanf("%d",&new_node->cla);
  35. while(1)
  36. {
  37. printf("\nEnter ID: ");
  38. scanf("%d",&new_node->id);
  39. int p1 = search(new_node->cla,new_node->id);
  40. if(p1>0)
  41. {
  42. printf("The ID is Already taken.\n");
  43. continue;
  44. }
  45. else
  46. {
  47. break;
  48. }
  49. }
  50. new_node->gpa = 0.00;
  51. new_node->total=0.00;
  52. if(new_node->cla ==9 || new_node->cla ==10)
  53. {
  54. printf("\nEnter Group: ");
  55. scanf("%s",&new_node->group);
  56. }
  57. else
  58. {
  59. char ec[10] = "NULL";
  60. strcpy(new_node->group,ec);
  61. }
  62. printf("\nEnter Parents Phone Number: ");
  63. scanf("%ld",&new_node->p_num);
  64. new_node->next=NULL;
  65. new_node->prev=NULL;
  66. start=new_node;
  67. end=new_node;
  68. current=new_node;
  69. system("cls");
  70. }
  71. else
  72. {
  73. struct student *new_node;
  74. new_node=(struct student*)malloc(1*sizeof(struct student));
  75. printf("Enter First Name: ");
  76. scanf("%s",&new_node->name);
  77. printf("\nEnter Last Name: ");
  78. scanf("%s",&new_node->name1);
  79. printf("\nEnter Gender: ");
  80. scanf("%s",&new_node->gender);
  81. printf("\nEnter Class: ");
  82. scanf("%d",&new_node->cla);
  83. new_node->gpa = 0.00;
  84. new_node->total=0.00;
  85. while(1)
  86. {
  87. printf("\nEnter ID: ");
  88. scanf("%d",&new_node->id);
  89. int p1 = search(new_node->cla,new_node->id);
  90. if(p1>0)
  91. {
  92. printf("The ID is Already taken.\n");
  93. continue;
  94. }
  95. else
  96. {
  97. break;
  98. }
  99. }
  100. if(new_node->cla ==9 || new_node->cla ==10)
  101. {
  102. printf("\nEnter Group: ");
  103. scanf("%s",&new_node->group);
  104. }
  105. else
  106. {
  107. char ec[10] = "NULL";
  108. strcpy(new_node->group,ec);
  109. }
  110. printf("\nEnter Parents Phone Number: ");
  111. scanf("%ld",&new_node->p_num);
  112. new_node->next=NULL;
  113. new_node->prev=NULL;
  114. current->next=new_node;
  115. new_node->prev=current;
  116. end=new_node;
  117. current=new_node;
  118. system("cls");
  119. }
  120. }
  121. void dis(int a)
  122. {
  123. int n=0,i=1;
  124. struct student *c;
  125. c=start;
  126. while(c!=NULL)
  127. {
  128. if(c->cla==a)
  129. {
  130.  
  131. printf("\t%d:\n\nName: %s %s Gender: %s\nID: %d Group: %s\n%.2lf Total Marks: %.2lf",i,c->name,c->name1,c->gender,c->id,c->group,c->gpa,c->total);
  132. printf("\n\n");
  133. i++;
  134.  
  135.  
  136. n++;
  137. }
  138. c=c->next;
  139. }
  140. //return n;
  141. if(n==0)
  142. printf("\n\nThere is no student in this Class\n");
  143. else
  144. printf("\n\nTotal Student %d\n",n);
  145. }
  146.  
  147. struct teacher
  148. {
  149. int id;
  150. char name[20];
  151. char name1[20];
  152. char gender[20];
  153. char group[20];
  154. long int phnum;
  155. struct teacher *next,*prev;
  156.  
  157. }*start1=NULL,*end1=NULL,*current1;
  158. void create1()
  159. {
  160. struct teacher *new_node;
  161. if(start1==NULL && end1==NULL)
  162. {
  163. new_node=(struct teacher*)malloc(1*sizeof(struct teacher));
  164. printf("Enter First Name: ");
  165. scanf("%s",&new_node->name);
  166. printf("\nEnter Last Name: ");
  167. scanf("%s",&new_node->name1);
  168. printf("\nEnter ID: ");
  169. scanf("%d",&new_node->id);
  170. printf("\nEnter Group: ");
  171. scanf("%s",&new_node->group);
  172. printf("\nEnter Gender: ");
  173. scanf("%s",&new_node->gender);
  174. printf("\nEnter Phone Number: ");
  175. scanf("%ld",&new_node->phnum);
  176. new_node->next=NULL;
  177. new_node->prev=NULL;
  178.  
  179. start1=new_node;
  180. end1=new_node;
  181. current1=new_node;
  182. system("cls");
  183.  
  184. }
  185. else
  186. {
  187. new_node=(struct teacher*)malloc(1*sizeof(struct teacher));
  188. printf("Enter First Name: ");
  189. scanf("%s",&new_node->name);
  190. printf("\nEnter Last Name: ");
  191. scanf("%s",&new_node->name1);
  192. printf("\nEnter ID: ");
  193. scanf("%d",&new_node->id);
  194. printf("\nEnter Group: ");
  195. scanf("%s",&new_node->group);
  196. printf("\nEnter Gender: ");
  197. scanf("%s",&new_node->gender);
  198. printf("\nEnter Phone Number: ");
  199. scanf("%ld",&new_node->phnum);
  200. new_node->next=NULL;
  201. new_node->prev=NULL;
  202.  
  203. current1->next=new_node;
  204. new_node->prev=current1;
  205. current1=new_node;
  206. end1=new_node;
  207. system("cls");
  208. }
  209.  
  210.  
  211.  
  212. }
  213. void dis1()
  214. {
  215. struct teacher *c;
  216. c=start1;
  217. while(c!=NULL)
  218. {
  219. printf("Teacher ID:%d\n",c->id);
  220. printf("Your group:%s\n",c->group);
  221. printf("Teacher Name:%s %s\n",c->name,c->name1);
  222. printf("Teacher Gender:%s\n",c->gender);
  223. printf("Teacher Phone number:%ld\n",c->phnum);
  224. c=c->next;
  225. }
  226. }
  227. int search(int a,int y)
  228. {
  229. struct student *c;
  230. struct teacher *c1;
  231. int po=0;
  232. if(a>0 && y>0)
  233. {
  234. c=start;
  235. while(c != NULL)
  236. {
  237. po++;
  238. if(c->cla==a && c->id == y)
  239. {
  240. return po;
  241. }
  242. c=c->next;
  243. }
  244. return -1;
  245. }
  246. else
  247. {
  248. c1=start1;
  249. while(c1!=NULL)
  250. {
  251. po++;
  252. if(c1->id==a)
  253. {
  254. return po;
  255. }
  256. c1=c1->next;
  257. }
  258. return -1;
  259.  
  260. }
  261. }
  262. void print1()
  263. {
  264. printf("\n\n\n");
  265. printf("\t\t\t1.Enter Student Details.\n");
  266. printf("\t\t\t2.View All Student Details\n");
  267. printf("\t\t\t3.Search Student Details.\n");
  268. printf("\t\t\t4.Enter Teacher Details.\n");
  269. printf("\t\t\t5.View All Teacher Details\n");
  270. printf("\t\t\t6.Search Teacher Details.\n");
  271. printf("\t\t\t7.Enter Student Results\n");
  272. printf("\t\t\t8.View Student Result\n");
  273. printf("\t\t\t9.Exit.\n");
  274. }
  275. void print2()
  276. {
  277. printf("\n\n\n");
  278. //printf("\t\t\t1.Enter Student Details.\n");
  279. printf("\t\t\t1.View All Student Details\n");
  280. //printf("\t\t\t3.Search Student Details.\n");
  281. //printf("\t\t\t4.Enter Teacher Details.\n");
  282. printf("\t\t\t2.View All Teacher Details\n");
  283. printf("\t\t\t3.Search Teacher Details.\n");
  284. //printf("\t\t\t7.Enter Student Results\n");
  285. printf("\t\t\t4.View Student Result\n");
  286. printf("\t\t\t5.Exit.\n");
  287. }
  288. void cls()
  289. {
  290. system("cls");
  291. }
  292.  
  293. void print()
  294. {
  295. int i;
  296. printf(" ");
  297. for(i=1; i<=59; i++)
  298. {
  299. printf("* ");
  300. }
  301. printf("\n\n");
  302. printf("\t\t\t\t\tDAFFODIL INTERNATIONAL SCHOOL\n\n");
  303. printf(" ");
  304. for(i=1; i<=59; i++)
  305. {
  306. printf("* ");
  307. }
  308. printf("\n");
  309. }
  310. void admin_and_student(int z)
  311. {
  312. int exit = 0,x;
  313. while(1)
  314. {
  315.  
  316. if(exit==1)
  317. {
  318. break;
  319. }
  320. //int x;
  321. cls();
  322. print();
  323. if(z==1)
  324. {
  325. print1();
  326. }
  327. else if(z==2)
  328. {
  329. print2();
  330. }
  331. scanf("%d",&x);
  332. if(z==2)
  333. {
  334. if(x==1)
  335. x=2;
  336. else if(x==2)
  337. x=5;
  338. else if(x==3)
  339. x=6;
  340. else if(x==4)
  341. x=8;
  342. else if(x==5)
  343. x=9;
  344. }
  345. switch(x)
  346. {
  347. case 1:
  348. {
  349. while(1)
  350. {
  351. system("cls");
  352. print();
  353. create();
  354. print();
  355. printf("\t\tDo you want to continue?\n");
  356. printf("1.Yes 2.No\n");
  357. int e;
  358. scanf("%d",&e);
  359. if(e==1)
  360. continue;
  361. else
  362. break;
  363. }
  364. system("cls");
  365. break;
  366. }
  367. case 2:
  368. {
  369. system("cls");
  370. print();
  371. printf("\t\t\t\t1.Class 6\n\t\t\t\t2.Class 7.\n\t\t\t\t3.Class 8.\n\t\t\t\t4.Class 9.\n\t\t\t\t5.Class 10.\n");
  372. int e;
  373. scanf("%d",&e);
  374. system("cls");
  375. switch(e)
  376. {
  377. case 1:
  378. {
  379. system("cls");
  380. print();
  381. dis(6);
  382. getch();
  383. system("cls");
  384. break;
  385. }
  386. case 2:
  387. {
  388. system("cls");
  389. print();
  390. dis(7);
  391. getch();
  392. system("cls");
  393. break;
  394. }
  395. case 3:
  396. {
  397. system("cls");
  398. print();
  399. dis(8);
  400. getch();
  401. system("cls");
  402. break;
  403. }
  404. case 4:
  405. {
  406. system("cls");
  407. print();
  408. dis(9);
  409. getch();
  410. system("cls");
  411. break;
  412. }
  413. case 5:
  414. {
  415. system("cls");
  416. print();
  417. dis(10);
  418. getch();
  419. system("cls");
  420. break;
  421. }
  422. }
  423. //dis();
  424. print();
  425. printf("\n\n\nPress any key to quit.");
  426. getch();
  427. system("cls");
  428. break;
  429. }
  430. case 3:
  431. {
  432. while(1)
  433. {
  434. system("cls");
  435. print();
  436. int x1,y1;
  437. printf("\n\n\nEnter Class: ");
  438. scanf("%d",&x1);
  439. printf("\nEnter Student ID: ");
  440. scanf("%d",&y1);
  441. system("cls");
  442. //print();
  443. int pos = search(x1,y1);
  444. if(pos==-1)
  445. {
  446. print();
  447. printf("\n\n\nNot Found");
  448. getch();
  449. system("cls");
  450. }
  451. else
  452. {
  453. print();
  454. struct student *b;
  455. b=start;
  456. int j;
  457. for(j=0; j<pos-1; j++)
  458. {
  459. b=b->next;
  460. }
  461. if(b->cla == 9 || b->cla == 10)
  462. {
  463. printf("\n\n\nName : %s %s\nGender : %s\nClass : %d\nID : %d\nGroup : %s\nParents Number : %ld\n",b->name,b->name1,b->gender,b->cla,b->id,b->group,b->p_num);
  464. }
  465. else
  466. {
  467. printf("\n\n\nName : %s %s\nGender : %s\nClass : %d\nID : %d\nParents Number : %ld\n",b->name,b->name1,b->gender,b->cla,b->id,b->p_num);
  468. }
  469. printf("\n\nPress any key.");
  470. getch();
  471. system("cls");
  472. }
  473. print();
  474. printf("\n\n\nDo you want to search another?\n 1.Yes 2.No\n");
  475. int e;
  476. scanf("%d",&e);
  477. if(e==1)
  478. continue;
  479. else if(e==2)
  480. break;
  481.  
  482. }
  483. system("cls");
  484. break;
  485. }
  486. case 4:
  487. {
  488. while(1)
  489. {
  490. system("cls");
  491. print();
  492. create1();
  493. int e;
  494. print();
  495. printf("\n\n\nDo you want to Continue?\n1.Yes 2.No\n");
  496. scanf("%d",&e);
  497. if(e==1)
  498. continue;
  499. else if(e==2)
  500. break;
  501. }
  502. system("cls");
  503. break;
  504. }
  505. case 5:
  506. {
  507. system("cls");
  508. print();
  509. dis1();
  510. getch();
  511. system("cls");
  512. break;
  513. }
  514. case 6:
  515. {
  516. while(1)
  517. {
  518. system("cls");
  519. print();
  520. printf("\n\n\nEnter Id:\n");
  521. int k;
  522. scanf("%d",&k);
  523. int pos1 = search(k,0);
  524. if(pos1==-1)
  525. {
  526. system("cls");
  527. print();
  528. printf("\n\n\nNot Found\n");
  529. getch();
  530. system("cls");
  531. }
  532. else
  533. {
  534. system("cls");
  535. print();
  536. struct teacher *c;
  537. c=start1;
  538. int j;
  539. for(j=0; j<pos1-1; j++)
  540. {
  541. c=c->next;
  542. }
  543. printf("\n\n\nTeacher Name :%s\n",c->name);
  544. printf("\nTeacher ID :%d",c->id);
  545. printf("\nGroup :%s",c->group);
  546. printf("\nTeacher Gender :%s",c->gender);
  547. printf("\nPhone number :%ld",c->phnum);
  548. getch();
  549. system("cls");
  550.  
  551. }
  552. print();
  553. printf("\n\n\nDo you want to continue?\n1.Yes 2.No\n");
  554. int e;
  555. scanf("%d",&e);
  556. if(e==1)
  557. continue;
  558. else
  559. break;
  560. }
  561. system("cls");
  562. break;
  563. }
  564. case 7:
  565. {
  566. while(1)
  567. {
  568. system("cls");
  569. print();
  570. int x1,y1;
  571. printf("\n\n\nEnter Class: ");
  572. scanf("%d",&x1);
  573. printf("\nEnter Student ID: ");
  574. scanf("%d",&y1);
  575. system("cls");
  576. int k;
  577. //y=2;
  578. int pos1 = search(x1,y1);
  579. if(pos1==-1)
  580. {
  581. system("cls");
  582. print();
  583. printf("\n\n\nNot Found\n");
  584. getch();
  585.  
  586. }
  587. else
  588. {
  589. print();
  590. total1 = 0.00;
  591. gpa1 = 0.00;
  592. struct student *c;
  593. c=start;
  594. int j,k=0;
  595. for(j=0; j<pos1-1; j++)
  596. {
  597. c=c->next;
  598. }
  599. printf("\n\n\nName : %s %s\n",c->name,c->name1);
  600. printf("Bangla : ");
  601. scanf("%lf",&c->bangla);
  602. gpa(c->bangla);
  603. printf("\nEnglish: ");
  604. scanf("%lf",&c->english);
  605. gpa(c->english);
  606. printf("\nMath: ");
  607. scanf("%lf",&c->math);
  608. gpa(c->math);
  609. if(strcmp(c->group,"Science") == 0 || strcmp(c->group,"science") == 0 || strcmp(c->group,"SCIENCE")==0)
  610. {
  611. printf("\nPhysics: ");
  612. scanf("%lf",&c->physics);
  613. gpa(c->physics);
  614. printf("\nChemistry: ");
  615. scanf("%lf",&c->chemistry);
  616. gpa(c->chemistry);
  617. printf("\nBiology: ");
  618. scanf("%lf",&c->biology);
  619. gpa(c->biology);
  620. }
  621. else if(strcmp(c->group,"Commerce") == 0 || strcmp(c->group,"commerce") == 0 || strcmp(c->group,"COMMERCE") == 0)
  622. {
  623. printf("\nAccounting: ");
  624. scanf("%lf",&c->acconting);
  625. gpa(c->acconting);
  626. printf("\nFinance And Banking: ");
  627. scanf("%lf",&c->finance);
  628. gpa(c->finance);
  629. printf("\nEconomics: ");
  630. scanf("%lf",&c->economics);
  631. gpa(c->economics);
  632. }
  633. else if(strcmp(c->group,"Arts") ==0 || strcmp(c->group,"arts")==0 || strcmp(c->group,"ARTS")==0)
  634. {
  635. printf("\nBangladesh and World Civilization: ");
  636. scanf("%lf",&c->bwc);
  637. gpa(c->bwc);
  638. printf("\nGeography And Environment: ");
  639. scanf("%lf",&c->ge);
  640. gpa(c->ge);
  641. printf("\nCivics and Citizenship :");
  642. scanf("%lf",&c->cc);
  643. gpa(c->cc);
  644. }
  645. else
  646. {
  647. printf("\nScience: ");
  648. scanf("%lf",&c->sceince);
  649. gpa(c->sceince);
  650. printf("\nICT: ");
  651. scanf("%lf",&c->ict);
  652. gpa(c->ict);
  653. printf("\nBangladesh And Global Studies: ");
  654. scanf("%lf",&c->bgs);
  655. gpa(c->bgs);
  656. }
  657. printf("\nReligion: ");
  658. scanf("%lf",&c->reli);
  659. gpa(c->reli);
  660. //getch();
  661. c->total = total1;
  662. c->gpa = gpa1/7.00;
  663. getch();
  664. system("cls");
  665. }
  666. int e;
  667. print();
  668. printf("\n\nDo you want to continue?\n1.Yes 2.No\n");
  669. scanf("%d",&e);
  670. if(e==1)
  671. continue;
  672. else
  673. break;
  674.  
  675. }
  676. system("cls");
  677. break;
  678. }
  679. case 8:
  680. {
  681. while(1)
  682. {
  683. system("cls");
  684. print();
  685. int x1,y1;
  686. printf("\n\nEnter Class: ");
  687. scanf("%d",&x1);
  688. printf("\nEnter Student ID: ");
  689. scanf("%d",&y1);
  690. system("cls");
  691. int k;
  692. int pos1 = search(x1,y1);
  693. if(pos1==-1)
  694. {
  695. printf("Not Found\n");
  696. getch();
  697. system("cls");
  698. }
  699. else
  700. {
  701. system("cls");
  702. struct student *c;
  703. c=start;
  704. int j;
  705. for(j=0; j<pos1-1; j++)
  706. {
  707. c=c->next;
  708. }
  709. print();
  710.  
  711. if(c->cla==9 || c->cla==10)
  712. {
  713. printf("\n\nName : %s %s Group: %s\nClass : %d Roll : %d\n",c->name,c->name1,c->group,c->cla,c->id);
  714. }
  715. else
  716. {
  717. printf("\n\nName : %s %s Class : %d Roll : %d\n",c->name,c->name1,c->cla,c->id);
  718. }
  719. printf("Bangla : %.2lf",c->bangla);
  720. printf("\n\nEnglish: %.2lf",c->english);
  721.  
  722. printf("\n\nMath: %.2lf\n",c->math);
  723.  
  724. if(strcmp(c->group,"Science") == 0 || strcmp(c->group,"science") == 0 || strcmp(c->group,"SCIENCE") == 0)
  725. {
  726.  
  727. printf("\n\nPhysics: %.2lf\n",c->physics);
  728.  
  729. printf("\n\nChemistry: %.2lf\n",c->chemistry);
  730.  
  731. printf("\n\nBiology: %.2lf\n",c->biology);
  732. }
  733. else if(strcmp(c->group,"Commerce") ==0 || strcmp(c->group,"commerce") == 0 || strcmp(c->group,"COMMERCE")==0)
  734. {
  735. printf("\n\nAccounting: %.2lf",c->acconting);
  736. printf("\n\nFinance And Banking: %.2lf",c->finance);
  737. printf("\n\nEconomics: %.2lf",c->economics);
  738. }
  739. else if(strcmp(c->group,"Arts") ==0 || strcmp(c->group,"arts")==0 || strcmp(c->group,"ARTS")==0)
  740. {
  741. printf("\n\nBangladesh and World Civilization: %.2lf",c->bwc);
  742. printf("\n\nGeography And Environment: %.2lf",c->ge);
  743. printf("\n\nCivics and Citizenship: %.2lf",c->cc);
  744. }
  745. else
  746. {
  747. printf("\n\nScience: %.2lf",c->sceince);
  748. printf("\n\nICT: %.2lf",c->ict);
  749. printf("\n\nBangladesh And Global Studies: %.2lf",c->bgs);
  750. }
  751. printf("\n\nReligion: %.2lf\n",c->reli);
  752. printf("\n\n\nTotal Number: %.2lf GPA: %.2lf\n",c->total,c->gpa);
  753.  
  754. getch();
  755. system("cls");
  756.  
  757. }
  758. int e;
  759. print();
  760. printf("Do you want to continue?\n1.Yes 2.No\n");
  761. scanf("%d",&e);
  762. if(e==1)
  763. continue;
  764. else if(e==2)
  765. break;
  766. }
  767. system("cls");
  768. break;
  769.  
  770.  
  771. }
  772. case 9:
  773. {
  774. exit = 1;
  775. break;
  776. }
  777.  
  778. }
  779. }
  780. }
  781. void gpa(double n)
  782. {
  783. total1 = total1 + n;
  784. if(n>=80)
  785. {
  786. gpa1 = gpa1 + 5.00;
  787. }
  788. else if(n>=70 && n<80)
  789. {
  790. gpa1 = gpa1 + 4.00;
  791. }
  792. else if(n>=60 && n<70)
  793. {
  794. gpa1 = gpa1 + 3.50;
  795. }
  796. else if(n>=50 && n<60)
  797. {
  798. gpa1 = gpa1 + 3.00;
  799. }
  800. else if(n>=40 && n<50)
  801. {
  802. gpa1 = gpa1 + 2.00;
  803. }
  804. else if(n>=33 && n<40)
  805. {
  806. gpa1 = gpa1 + 0.00;
  807. }
  808. }
  809. void admin()
  810. {
  811. int d=0;
  812. char c[10],p[10];
  813. while(1)
  814. {
  815.  
  816. system("cls");
  817. print();
  818. if(d==1)
  819. {
  820. system("cls");
  821. print();
  822. printf("\t\t\tWrong Password! Try again.");
  823. }
  824. printf("\n\n\n");
  825. printf("\t\t\t\tEnter User Name: ");
  826. scanf("%s",c);
  827. printf("\n");
  828. printf("\t\t\t\tEnter Password: ");
  829. scanf("%s",&p);
  830. if(strcmp(c,"techy5")==0 && strcmp(p,"121172")==0)
  831. {
  832. system("cls");
  833. print();
  834. printf("\t\t\tWelcome To Daffodil International School.\n\n\n");
  835. printf("\t\t\tPress any key to enter in the Admin Panel\n");
  836. getch();
  837. system("cls");
  838. break;
  839. }
  840. else
  841. {
  842. system("cls");
  843. d=1;
  844. //printf("Wrong Password! Try again.\n");
  845. continue;
  846. }
  847. }
  848. }
  849.  
  850. int main()
  851. {
  852. int x,y,ex=0,d=0;
  853. char c[10],p[10];
  854. while(1)
  855. {
  856. if(ex==1)
  857. {
  858. break;
  859. }
  860. cls();
  861. print();
  862. printf("\n\n\n");
  863. printf("1.Admin Panel.\n\n2.Student Panel.\n\n3.Exit.\n\n");
  864. scanf("%d",&x);
  865. switch(x)
  866. {
  867. case 1:
  868. {
  869. admin();
  870. //getch();
  871. admin_and_student(1);
  872. break;
  873.  
  874. }
  875. case 2:
  876. {
  877. admin_and_student(2);
  878. break;
  879. }
  880. case 3:
  881. {
  882. cls();
  883. print();
  884. printf("Thank You.\n");
  885. getch();
  886. ex=1;
  887. break;
  888. }
  889. }
  890. }
  891. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement