Advertisement
mustahidhasan

Untitled

Jul 23rd, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 26.50 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4. ///teacher structure
  5. typedef struct teacher
  6. {
  7.     char name[15], id[15], room[5], sub[10],pay[20];///room means class
  8.     float salary;
  9.  
  10.     struct teacher *next;
  11.  
  12. } teach;
  13. ///student structure
  14. typedef struct student
  15. {
  16.     char name[15], id[15], sec[2], Class[5],pay[30];
  17.     float fees;
  18.  
  19.     struct student *next;
  20. } stu;
  21. ///globally decleared varriables
  22. teach *headT = NULL;
  23. teach *tempT = NULL;
  24. teach *prevT = NULL;
  25.  
  26. stu *headS = NULL;
  27. stu *tempS = NULL;
  28. stu *prevS = NULL;
  29. int i = 0, countT = 0, countS = 0;
  30. ///every code has to be below
  31.  
  32. ///entry area
  33. //teachers data entry
  34.  
  35. void entryTeacher()
  36. {
  37.     int n;
  38.     printf("How many Teachers data you want to enter:");
  39.     scanf("%d", &n);
  40.  
  41.     for(i = 0; i < n; i++)
  42.     {
  43.         teach *newNode;
  44.         printf("\nEnter data for #%d no Teacher\n",++countT);
  45.         newNode = (teach*)malloc(sizeof(teach));
  46.         printf("\tEnter Teacher Name:");
  47.         scanf("%s", &newNode-> name);
  48.         printf("\tEnter Teachers ID:");
  49.         scanf("%s", &newNode-> id);
  50.         printf("\tEnter Subject:");
  51.         scanf("%s", &newNode-> sub);
  52.         printf("\tEnter Room NO:");
  53.         scanf("%s", &newNode-> room);
  54.         printf("\tEnter salary:");
  55.         scanf("%f", &newNode-> salary);
  56.         printf("\tEnter Payment Status:");
  57.         scanf("%s", &newNode-> pay);
  58.         newNode-> next = NULL;
  59.  
  60.         if(headT == NULL)
  61.         {
  62.             headT = newNode;
  63.         }
  64.         else
  65.         {
  66.             tempT = headT;
  67.             while(tempT-> next != NULL)
  68.                 tempT = tempT-> next;
  69.             tempT-> next = newNode;
  70.         }
  71.     }
  72. }
  73. //teachers data ends here
  74.  
  75. //students data entry
  76. void entryStudent()
  77. {
  78.     int n;
  79.     printf("How many Students data you want to enter:");
  80.     scanf("%d", &n);
  81.  
  82.     for(i = 0; i < n; i++)
  83.     {
  84.         stu *newNode;
  85.         printf("\nEnter data for #%d no Student\n",++countS);
  86.         newNode = (stu*)malloc(sizeof(stu));
  87.         printf("\tEnter Student Name:");
  88.         scanf("%s", &newNode-> name);
  89.         printf("\tEnter student ID:");
  90.         scanf("%s", &newNode-> id);
  91.         printf("\tEnter Section:");
  92.         scanf("%s", &newNode-> sec);
  93.         printf("\tEnter Class NO:");
  94.         scanf("%s", &newNode-> Class);
  95.         printf("\tEnter Fees:");
  96.         scanf("%f", &newNode-> fees);
  97.         printf("\tEnter Payment Status:");
  98.         scanf("%s", &newNode-> pay);
  99.  
  100.         newNode-> next = NULL;
  101.  
  102.         if(headS == NULL)
  103.         {
  104.             headS = newNode;
  105.         }
  106.         else
  107.         {
  108.             tempS = headS;
  109.             while(tempS-> next != NULL)
  110.                 tempS = tempS-> next;
  111.             tempS-> next = newNode;
  112.         }
  113.     }
  114. }
  115. //STUDENTS DATA ends here
  116.  
  117. void searchAT()
  118. {
  119.     teach *pre=NULL;
  120.     teach *temp=headT;
  121.  
  122.     ///Searching & deleted by any value....
  123.  
  124.     char src[20];
  125.     printf("Enter Teachers search value name, ID ,Subject or Room no:");
  126.     scanf("%s",src);
  127.     while(temp!=NULL && ((strcmp(temp->name,src)!=0)&&((strcmp(temp->room,src)!=0) && (strcmp(temp->id,src)!=0)&&(strcmp(temp->sub,src)!=0))))
  128.     {
  129.         pre=temp;
  130.         temp=temp-> next;
  131.     }
  132.  
  133.     if(temp==NULL)
  134.     {
  135.         printf("\nNot Found your value\n\n");
  136.     }
  137.  
  138.     else
  139.     {
  140.         printf("\nSearch Teacher's information:\n");
  141.         printf("\tTeacher Name: %s\n",temp-> name);
  142.         printf("\tTeacher ID: %s\n",temp->id);
  143.         printf("\tTeacher Subject: %s\n",temp->sub);
  144.         printf("\tTeacher Room No: %s\n",temp->room);
  145.         printf("\tTeacher Salary: %.2f\n",temp->salary);
  146.         printf("\tTeacher Payment status: %s\n",temp->pay);
  147.  
  148.  
  149.         printf("\n\tEnter 1 for delete or Enter 2 for Edit..\n");
  150.         int d;
  151.         scanf("%d",&d);
  152.         if(2==d)
  153.         {
  154.             printf("\t\tEnter update Teacher Name:");
  155.             scanf("%s", &temp-> name);
  156.             printf("\t\tEnter update Teacher ID:");
  157.             scanf("%s", &temp-> id);
  158.             printf("\t\tEnter update Teacher Subject:");
  159.             scanf("%s", &temp-> sub);
  160.             printf("\t\tEnter update Teacher Room no:");
  161.             scanf("%s", &temp-> room);
  162.             printf("\t\tEnter update Teacher Salary:");
  163.             scanf("%f", &temp-> salary);
  164.             printf("\t\tEnter update Teacher Payment Status:");
  165.             scanf("%s", &temp-> pay);
  166.  
  167.  
  168.  
  169.             printf("\nUpdate Successfully\n\n");
  170.         }
  171.         else if(d==1)
  172.         {
  173.             if(temp==headT)
  174.             {
  175.                 headT=temp->next;
  176.                 printf("\nInformation of %s has deleted successfully \n\n",temp->name);
  177.                 free(temp);
  178.                 --countT;
  179.             }
  180.             pre->next=temp->next;
  181.             printf("\nInformation of %s has deleted successfully \n\n",temp->name);
  182.             free(temp);
  183.             --countT;
  184.         }
  185.  
  186.     }
  187.  
  188. }
  189.  
  190. void searchAS()
  191. {
  192.     stu *pre=NULL;
  193.     stu *temp=headS;
  194.  
  195.     ///Searching & deleted by any value....
  196.  
  197.     char src[20];
  198.     printf("Enter Students search value name, ID ,Subject or Class:");
  199.     scanf("%s",src);
  200.     while(temp!=NULL && ((strcmp(temp->name,src)!=0)&&((strcmp(temp->sec,src)!=0) && (strcmp(temp->id,src)!=0))))
  201.     {
  202.         pre=temp;
  203.         temp=temp-> next;
  204.     }
  205.  
  206.     if(temp==NULL)
  207.     {
  208.         printf("\nNot Found your value\n\n");
  209.     }
  210.  
  211.     else
  212.     {
  213.         printf("\nSearch Student's information:\n");
  214.         printf("\tStudent's Name: %s\n",temp-> name);
  215.         printf("\tStudent's ID: %s\n",temp->id);
  216.         printf("\tStudent's Section: %s\n",temp->sec);
  217.         printf("\tStudent's Class: %s\n",temp->Class);
  218.         printf("\tStudent's Fees: %.2f\n",temp->fees);
  219.         printf("\tStudent's Payment status: %s\n",temp->pay);
  220.  
  221.  
  222.         printf("\n\tEnter 1 for delete or Enter 2 for Edit..\n");
  223.         int d;
  224.         scanf("%d",&d);
  225.         if(2==d)
  226.         {
  227.             printf("\t\tEnter update Student's Name:");
  228.             scanf("%s", &temp-> name);
  229.             printf("\t\tEnter update Student's ID:");
  230.             scanf("%s", &temp-> id);
  231.             printf("\t\tEnter update Student's Section:");
  232.             scanf("%s", &temp-> sec);
  233.             printf("\t\tEnter update Student's Class:");
  234.             scanf("%s", &temp-> Class);
  235.             printf("\t\tEnter update Student's Fees:");
  236.             scanf("%f", &temp-> fees);
  237.             printf("\tEnter update Student's Payment Status:");
  238.             scanf("%s", &temp-> pay);
  239.  
  240.  
  241.  
  242.             printf("Update Successfully\n\n");
  243.         }
  244.         else if(d==1)
  245.         {
  246.             if(temp==headS)
  247.             {
  248.                 headS=temp->next;
  249.                 printf("\nInformation of %s has deleted successfully \n\n",temp->name);
  250.                 free(temp);
  251.                 --countS;
  252.             }
  253.             pre->next=temp->next;
  254.             printf("\nInformation of %s has deleted successfully \n\n",temp->name);
  255.             free(temp);
  256.             --countS;
  257.         }
  258.  
  259.     }
  260.  
  261. }
  262.  
  263.  
  264. ///printing area
  265. //print teachers info
  266. void printTeacher()
  267. {
  268.     printf("\n\t\tDisplay Teachers Information\n");
  269.     tempT = headT;
  270.     printf("Total %d Teachers Data\n", countT);
  271.     int c=1;
  272.     while(tempT != NULL)
  273.     {
  274.         printf("Teacher SL NO:%d\n",c);
  275.         printf("\tTeachers ID: %s\n", tempT-> id);
  276.         printf("\tTeachers Name: %s\n", tempT-> name);
  277.         printf("\tAssigned Subject: %s\n", tempT-> sub);
  278.         printf("\tAssigned Room NO: %s\n", tempT-> room);
  279.         printf("\tMonthly Salary: %.2f\n\n", tempT-> salary);
  280.         tempT=tempT->next;
  281.     }
  282. }
  283. //student information display area
  284. void printStudent()
  285. {
  286.     printf("\n\t\tDisplay Students Information\n");
  287.     tempS =headS;
  288.     printf("Total %d Students Data\n",countS);
  289.     int c =1;
  290.     while(tempS!=NULL)
  291.     {
  292.         printf("Student SL NO: %d\n",++c);
  293.         printf("\tStudent ID: %s\n",tempS->id);
  294.         printf("\tStudent Name: %s\n",tempS->name);
  295.         printf("\tStudent Section: %s\n",tempS->sec);
  296.         printf("\tStudent Class: %s\n",tempS->Class);
  297.         printf("\tStudent Fees: %.2f\n\n",tempS->fees);
  298.         tempS=tempS->next;
  299.     }
  300.  
  301. }
  302. ///Printing Area ends...!
  303. ///searching area
  304. //teachers search code starts here
  305. void searchT()
  306. {
  307.     tempT = headT;
  308.     char value[15];
  309.     printf("Enter The Data You Want To search(Name Or ID Or Subject Or Room NO\n");
  310.     printf("\tPlease Enter Your Required Data:");
  311.     scanf("%s", &value);
  312.  
  313.     while(tempT-> next != NULL && ((strcmp(tempT-> name, value)) && (strcmp(tempT-> id, value)) && (strcmp(tempT-> sub, value)) && (strcmp(tempT-> room, value)) && (strcmp(tempT-> room, value)) ) != 0 )
  314.         tempT = tempT-> next;
  315.  
  316.     if(tempT == NULL)
  317.         printf("SORRY...! Data Not Found\n");
  318.     else
  319.     {
  320.         printf("\nData Found Your Data Should Be below here\n");
  321.         printf("\tTeachers ID: %s\n", tempT-> id);
  322.         printf("\tTeachers Name: %s\n", tempT-> name);
  323.         printf("\tAssigned Subject: %s\n", tempT-> sub);
  324.         printf("\tAssigned Room NO: %s\n", tempT-> room);
  325.         printf("\tMonthly Salary: %.2f\n\n", tempT-> salary);
  326.  
  327.  
  328.     }
  329. }
  330. //Teachers search code ends here
  331.  
  332. //students search code starts here
  333. void searchS()
  334. {
  335.     tempS = headS;
  336.     char value[15];
  337.     printf("Enter The Data You Want To search(Name Or ID Or Section Or Class NO\n");
  338.     printf("\tPlease Enter Your Required Data:");
  339.     scanf("%s", &value);
  340.  
  341.     while(tempS-> next != NULL && ((strcmp(tempS-> name, value)) && (strcmp(tempS-> id, value)) && (strcmp(tempS-> sec, value)) && (strcmp(tempS-> Class, value)) != 0 ))
  342.         tempS = tempS-> next;
  343.  
  344.     if(tempS == NULL)
  345.         printf("SORRY...! Data Not Found\n");
  346.     else
  347.     {
  348.         printf("\nData Found Your Data Should Be below here\n");
  349.         printf("\tStudent ID: %s\n",tempS->id);
  350.         printf("\tStudent Name: %s\n",tempS->name);
  351.         printf("\tStudent Section: %s\n",tempS->sec);
  352.         printf("\tStudent Class: %s\n",tempS->Class);
  353.         printf("\tStudent Fees: %.2f\n\n",tempS->fees);
  354.     }
  355.  
  356. }
  357.  
  358. //students search code ends here
  359.  
  360. void paymentCheckS()
  361. {
  362.     char pass[32],password[]= {"password"};
  363.     stu *pre=NULL;
  364.     stu *temp=headS;
  365.  
  366.     ///Searching & deleted by any value....
  367.  
  368.     char src[20];
  369.     printf("Enter Students search value name, ID\n");
  370.     scanf("%s",&src);
  371.     while(temp!=NULL && ((strcmp(temp->name,src)!=0) && (strcmp(temp->id,src)!=0)))
  372.     {
  373.         pre=temp;
  374.         temp=temp-> next;
  375.     }
  376.  
  377.     if(temp==NULL)
  378.     {
  379.         printf("\nNot Found your value\n\n");
  380.     }
  381.  
  382.     else
  383.     {
  384.         printf("\nSearch Student's information:\n");
  385.         printf("\tStudent's Name: %s\n",temp-> name);
  386.         printf("\tStudent's ID: %s\n",temp->id);
  387.         printf("\tStudent's Section: %s\n",temp->sec);
  388.         printf("\tStudent's Class: %s\n",temp->Class);
  389.         printf("\tStudent's Fees: %.2f\n",temp->fees);
  390.         printf("\tStudent's Payment status: %s\n",temp->pay);
  391.  
  392.  
  393.         printf("\n\tEnter Password for Payment Update..\n");
  394.         int d;
  395.         scanf("%s",&pass);
  396.         if(strcmp(pass,password)==0)
  397.         {
  398.             printf("\tEnter update Student's Payment Status:");
  399.             scanf("%s", &temp-> pay);
  400.  
  401.  
  402.  
  403.             printf("\nUpdate Successfully\n\n");
  404.         }
  405.         else
  406.             printf("\n=>=>=>=>\tYour Password was incorrect\t<=<=<=<=\n");
  407.  
  408.     }
  409.  
  410. }
  411. void paymentCheckT()
  412. {
  413.     char pass[32],password[]= {"password"};
  414.     teach *pre=NULL;
  415.     teach *temp=headT;
  416.  
  417.     ///Searching & deleted by any value....
  418.  
  419.     char src[20];
  420.     printf("Enter Students search value name, ID\n");
  421.     scanf("%s",&src);
  422.     while(temp!=NULL && ((strcmp(temp->name,src)!=0) && (strcmp(temp->id,src)!=0)))
  423.     {
  424.         pre=temp;
  425.         temp=temp-> next;
  426.     }
  427.  
  428.     if(temp==NULL)
  429.     {
  430.         printf("\nNot Found your value\n\n");
  431.     }
  432.  
  433.     else
  434.     {
  435.         printf("\nSearch Teacher's information:\n");
  436.         printf("\tTeacher Name: %s\n",temp-> name);
  437.         printf("\tTeacher ID: %s\n",temp->id);
  438.         printf("\tTeacher Subject: %s\n",temp->sub);
  439.         printf("\tTeacher Room No: %s\n",temp->room);
  440.         printf("\tTeacher Salary: %.2f\n",temp->salary);
  441.         printf("\tTeacher Payment status: %s\n",temp->pay);
  442.  
  443.  
  444.         printf("\n\tEnter Password for Payment Update..\n");
  445.         int d;
  446.         scanf("%s",&pass);
  447.         if(strcmp(pass,password)==0)
  448.         {
  449.             printf("\tEnter update Student's Payment Status:");
  450.             scanf("%s", &temp-> pay);
  451.  
  452.  
  453.  
  454.             printf("\nUpdate Successfully\n\n");
  455.         }
  456.         else
  457.             printf("\n=>=>=>=>\tYour Password was incorrect\t<=<=<=<=\n");
  458.  
  459.     }
  460.  
  461. }
  462.  
  463.  
  464. int main()
  465. {
  466.     int o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11,o12,o13,o14,o15,o16,o17,o18,o19,o20;///these are options
  467.     char pass[32],password[]= {"password"};
  468.     printf("\t\t\t\tWelcome to our Project\n\t\t==================================================\n\n");
  469.     printf("\tProject  Name: School Management System\n");
  470.     printf("\tProject Team Name: Code Cracker\n");
  471.     printf("\tProject Team Member: \n");
  472.     printf("\t\tAbrar Hamim(183-15-11821)\n");
  473.     printf("\t\tMustahid Hasan(183-15-11813)\n");
  474.     printf("\t\tMd Nurnobi Hosen(183-15-11820)\n");
  475.     printf("______________________________________________________________________________________________________\n\n");
  476.     printf("------------------------------------------------------------------------------------------------------\n\n");
  477.     for(;;)
  478.     {
  479.         printf("Choose any of the below:\n");
  480.         printf("______________________________________________________________________________________________________\n\n");
  481.         printf("\n\tPress 1 For Admin\tPress 2 For Teacher\tPress 3 For Student\tPress 0 To Exit\n");
  482.  
  483.         printf("______________________________________________________________________________________________________\n\n");
  484.         printf("\n\t\tSelect option: ");
  485.  
  486.         scanf("%d",&o1);
  487.         printf("\n");
  488.  
  489.         if(o1==1)
  490.         {
  491.             printf("______________________________________________________________________________________________________\n\n");
  492.  
  493.             printf("\t\t\tEnter Password : ");
  494.             scanf("%s",&pass);
  495.             printf("\n");
  496.             if(strcmp(pass,password)==0)
  497.             {
  498. ///admin panel stats here
  499.                 printf("\t\t\t\tAdministrator Portal\n\t\t==================================================\n\n");
  500.                 for(;;)
  501.                 {
  502.                     printf("\tPress 1 For Teacher\tPress 2 For Student\tPress 3 For Displaying Data List\tPress 0 TO Exit\n ");
  503.                     printf("______________________________________________________________________________________________________\n\n");
  504.                     printf("\n\t\tSelect option: ");
  505.  
  506.                     scanf("%d",&o2);
  507.                     printf("\n");
  508.  
  509.                     ///teachers
  510.                     if(o2==1)
  511.                     {
  512.                         printf("\tPress 1 For Teachers Data Entry   Press 2 For Searching Teachers Data\tPress 3 For Payment Status\tTo Return back Press 4\tTo Exit press 0\n");
  513.                         printf("______________________________________________________________________________________________________\n\n");
  514.                         printf("\n\t\tSelect option: ");
  515.  
  516.                         scanf("%d",&o3);
  517.                         printf("\n");
  518.  
  519.                         if(o3==1)
  520.                             entryTeacher();
  521.                         else if(o3==2)
  522.                             searchAT();
  523.                         else if(o3==3)
  524.                         {
  525.                             printf("\n\tPress 1 For Students Payment Status\tPress 2 For Teachers Payment Status\tTo return Press 0\n\n");
  526.                             printf("______________________________________________________________________________________________________\n\n");
  527.                             printf("\n\t\tSelect option: ");
  528.  
  529.                             scanf("%d",&o6);
  530.                             printf("\n");
  531.                             if(o6==1)
  532.                                 paymentCheckS();
  533.                             else if(o6==2)
  534.                                 paymentCheckT();
  535.                             else
  536.                                 continue;
  537.                         }
  538.                         else if(o3==4)
  539.                             continue;
  540.                         else if(o3==0)
  541.                             return 0;
  542.  
  543.  
  544.                     }
  545.                     else if(o2==2)
  546.                     {
  547.                         printf("\tPress 1 For Students Data Entry   Press 2 For Searching Students Data\tTo Return Press 3\tTo Exit Press 0\n");
  548.                         printf("______________________________________________________________________________________________________\n\n");
  549.                         printf("\n\t\tSelect option: ");
  550.  
  551.                         scanf("%d",&o3);
  552.                         printf("\n");
  553.                         if(o3==1)
  554.                             entryStudent();
  555.                         else if(o3==2)
  556.                             searchAS();
  557.                         else if(o3==3)
  558.                             continue;
  559.                         else if(o3==0)
  560.                             return 0;
  561.  
  562.                     }
  563.                     else if(o2==3)
  564.                     {
  565.                         printf("\n\tPress 1 TO Display Teachers Data List\tPress 2 TO Display Students Data List\tTo Return press 0\tExit for press 0\n");
  566.                         printf("______________________________________________________________________________________________________\n\n");
  567.                         printf("\n\t\tSelect option: ");
  568.  
  569.                         scanf("%d",&o4);
  570.                         printf("\n");
  571.                         if(o4==1)
  572.                             printTeacher();
  573.                         else if(o4==2)
  574.                             printStudent();
  575.                         else if(o4==3)
  576.                             continue;
  577.                         else
  578.                             return 0;
  579.  
  580.                     }
  581.                     else
  582.                         return 0;
  583.  
  584.                 }
  585.             }
  586.             else
  587.             {
  588.                 printf("\n=>=>=>=>\tYour Password was incorrect\t<=<=<=<=\n");
  589.                 printf("\n\tPress 1 For Trying again\tTo Exit Press 0\n\n");
  590.                 printf("______________________________________________________________________________________________________\n\n");
  591.  
  592.                 printf("\t\tSelect Option:");
  593.                 scanf("%d",&o5);
  594.                 printf("\n");
  595.                 if(o5==1)
  596.                     continue;
  597.                 else
  598.                     return 0;
  599.             }
  600.         }
  601.  
  602. ///ends Admin area
  603. ///start Teachers Area
  604.         if(o1==2)
  605.         {
  606.             printf("______________________________________________________________________________________________________\n\n");
  607.  
  608.             printf("\t\t\tEnter Password : ");
  609.             scanf("%s",&pass);
  610.             printf("\n");
  611.             if(strcmp(pass,password)==0)
  612.  
  613.  
  614.             {
  615.                 printf("\t\t\t\tTeachers Portal\n\t\t==================================================\n\n");
  616.                 for(;;)
  617.                 {
  618.                     printf("\tFor teacher please Press 1\t For Students Press 2\tPress 3 For Displaying List\tTo Exit Press 0\n ");
  619.                     printf("______________________________________________________________________________________________________\n\n");
  620.                     printf("\n\t\tSelect option: ");
  621.  
  622.                     scanf("%d",&o7);
  623.                     printf("\n");
  624.                     ///teachers
  625.                     if(o7==1)
  626.                     {
  627.                         printf("\tPress 1 for Searching Teachers Information\tFor Payment check press 2\tTo Return back Press 3\tTo Exit Press 0\n");
  628.                         printf("______________________________________________________________________________________________________\n\n");
  629.                         printf("\n\t\tSelect option: ");
  630.  
  631.                         scanf("%d",&o8);
  632.                         printf("\n");
  633.                         if(o8==1)
  634.                             searchT();
  635.                         else if(o8==2)
  636.                         {
  637.                             printf("\n\tFor Teachers Payment check Press 1\tTo Return Back Press 0\n\n");
  638.                             printf("______________________________________________________________________________________________________\n\n");
  639.                             printf("\n\t\tSelect option: ");
  640.  
  641.                             scanf("%d",&o6);
  642.                             printf("\n");
  643.                             if(o6==1)
  644.                                 paymentCheckT();
  645.                             else
  646.                                 continue;
  647.                         }
  648.                         else if(o8==3)
  649.                             continue;
  650.                         else if(o8==0)
  651.                             return 0;
  652.  
  653.  
  654.                     }
  655.                     else if(o7==2)
  656.                     {
  657.                         printf("\tPress 1 for Students Data Entry\t To Search Students Press 2\tFor Students Payment Status Press 3\tTo Return back Press 4\tTO Exit Press 0\n");
  658.                         printf("______________________________________________________________________________________________________\n\n");
  659.                         printf("\n\t\tSelect option: ");
  660.  
  661.                         scanf("%d",&o9);
  662.                         printf("\n");
  663.                         if(o9==1)
  664.                             entryStudent();
  665.                         else if(o9==2)
  666.                             searchAS();
  667.                         else if(o9==3)
  668.                             paymentCheckS();
  669.                         else if(o9==4)
  670.                             continue;
  671.                         else if(o9==0)
  672.                             return 0;
  673.  
  674.                     }
  675.                     else if(o7==3)
  676.                     {
  677.                         printf("\n\t To see Teachers List Press 1\tTo see Students List Press 2\tTo Return back Press 2\tTo Exit Press 0\n");
  678.                         printf("______________________________________________________________________________________________________\n\n");
  679.                         printf("\n\t\tSelect option: ");
  680.  
  681.                         scanf("%d",&o10);
  682.                         printf("\n");
  683.                         if(o10==1)
  684.                             printTeacher();
  685.                         else if(o10==2)
  686.                             printStudent();
  687.                         else if(o10==3)
  688.                             continue;
  689.                         else
  690.                             return 0;
  691.  
  692.                     }
  693.                     else
  694.                         return 0;
  695.  
  696.                 }
  697.             }
  698.             else
  699.             {
  700.                 printf("\n=>=>=>=>\tYour Password was incorrect\t<=<=<=<=\n");
  701.                 printf("\nTo Try Again Press 1\n To Exit Press 0\n\n");
  702.                 printf("______________________________________________________________________________________________________\n\n");
  703.                 printf("\n\t\tSelect option: ");
  704.  
  705.                 scanf("%d",&o11);
  706.                 printf("\n");
  707.                 if(o11==1)
  708.                     continue;
  709.                 else
  710.                     return 0;
  711.             }
  712.         }
  713.  
  714. ///ends Teachers area
  715. ///start Students Area
  716.         if(o1==3)
  717.         {
  718.             printf("\t\t\t\tStudents Portal\n\t\t==================================================\n\n");
  719.             for(;;)
  720.             {
  721.                 printf("\tFor teacher please press 1\t For Students Press 2\tTO Display List Press 3\tTO Exit Press 0\n ");
  722.                 printf("______________________________________________________________________________________________________\n\n");
  723.                 printf("\n\t\tSelect option: ");
  724.  
  725.                 scanf("%d",&o7);
  726.                 printf("\n");
  727.                 ///teachers
  728.                 if(o7==1)
  729.                 {
  730.                     printf("\tTO Search Teachers Information press 1\tTo return back Press 2\tTo Exit Press 0\n");
  731.                     printf("______________________________________________________________________________________________________\n\n");
  732.                     printf("\n\t\tSelect option: ");
  733.  
  734.                     scanf("%d",&o8);
  735.                     printf("\n");
  736.                     if(o8==1)
  737.                         searchT();
  738.                     else if(o8==2)
  739.                         continue;
  740.                     else if(o8==0)
  741.                         return 0;
  742.  
  743.  
  744.                 }
  745.                 else if(o7==2)
  746.                 {
  747.                     printf("\tTO Search Students Information Press 1\tFor Payment Status Press 2\tTo Return back Press 3\tTo Exit Press 0\n");
  748.                     printf("______________________________________________________________________________________________________\n\n");
  749.                     printf("\n\t\tSelect option: ");
  750.  
  751.                     scanf("%d",&o9);
  752.                     printf("\n");
  753.                     if(o9==1)
  754.                         searchS();
  755.                     if(o9==2)
  756.                         paymentCheckS();
  757.                     else if(o9==3)
  758.                         continue;
  759.                     else if(o9==0)
  760.                         return 0;
  761.  
  762.                 }
  763.                 else if(o7==3)
  764.                 {
  765.                     printf("\n\tTo See Teachers List Press 1\tTo See Students List Press 2\tTo Return back Press 2\tTo Exit Press 0\n");
  766.                     printf("______________________________________________________________________________________________________\n\n");
  767.                     printf("\n\t\tSelect option: ");
  768.  
  769.                     scanf("%d",&o10);
  770.                     printf("\n");
  771.                     if(o10==1)
  772.                         printTeacher();
  773.                     else if(o10==2)
  774.                         printStudent();
  775.                     else if(o10==3)
  776.                         continue;
  777.                     else
  778.                         return 0;
  779.  
  780.                 }
  781.                 else
  782.                     return 0;
  783.  
  784.             }
  785.         }
  786.  
  787.  
  788. ///ends Students Area
  789.         else
  790.             return 0;
  791.     }
  792.     return 0;
  793.  
  794. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement