mdnurnobihosen

School management system project v6.7.2.4

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