Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //The username and the pass for the admin are admin 12321
- #include <stdio.h>
- void payment(WIP)
- {
- //it's gonna print the payment info for a student chosen by the administrator
- }
- void modify(WIP)
- {
- //it's gonna modify the array without returning anything
- }
- void delete(WIP)
- {
- //it's gonna modify the array without returning anything
- }
- void assessmentteacher(WIP)
- {
- //prints the assessment and returns nothing
- }
- void assessmentstuden(WIP)
- {
- //prints the assessment and returns nothing
- }
- void add(WIP)
- {
- //WIP
- }
- int searchstudent(char studentname[]) WIP
- {
- //it's gonna return the address
- }
- int searchteacher(WIP)
- {
- //it's gonna return the address
- }
- void login(char user[100], char pass[100])
- {
- while (1)
- {
- printf("Please enter your username:\n");
- scanf("%s", user);
- if(user != 'admin')
- {
- printf("Invalid Username.\n");
- continue;
- }
- else if(user == 'admin')
- {
- break;
- }
- }
- while(1)
- {
- printf("\nPlease enter your password:\n");
- scanf("%s", pass);
- if(pass != '12321')
- {
- printf("Invalid Password!\n");
- continue;
- }
- else if(pass == '12321')
- {
- admin();
- }
- }
- }
- void admin(char SName[1][100], int SInfo[4][100], int TName[][], int TInfop[][]) WIP
- {
- int choice; char delchoice = 'a'; char search = 'a'; char searchagain = 'a'; char assessment = 'a';
- char assessmentagain = 'a'; char paymentchoice = 'a';
- 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");
- scanf("%d", &choice");
- if(choice == 1)
- {
- printf("\nWhat would you like to do? (A/D/M)\n");
- scanf("\n%c", &delchoice);
- if(delchoice == 'A' || delchoice == 'a')
- {
- add(WIP);
- }
- else if(delchoice == 'M' || delchoice == 'm')
- {
- modify(WIP);
- }
- else if(delchoice == 'D' || delchoice == 'd')
- {
- delete(WIP);
- }
- }
- else if(choice == 2)
- {
- do
- {
- printf("\nWhat would you like to search for? (S/T)\n");
- scanf("\n%c", &search);
- if(search == 'S' || search == 's')
- {
- searchstudent(WIP);
- }
- else if(search == 'T' || search == 't')
- {
- searchteacher(WIP);
- }
- printf("\nWould you like to search for anything else? (Y/N)\n");
- scanf("\n%c", &searchagain);
- }
- while(searchagain == 'Y' || searchagain == 'y');
- }
- else if(choice == 3)
- {
- do
- {
- printf("\nWho would you like to print the assessment for? (S/T)\n");
- scanf("\n%c", &assessment);
- if(assessment == 'S' || assessment == 's')
- {
- assessmentstuden(WIP);
- }
- else if(assessment == 'T' || assessment == 't')
- {
- assessmentteacher(WIP);
- }
- printf("\nWould you like to print another assessment? (Y/N)\n");
- scanf("\n%c", &assessmentagain);
- }
- while(assessmentagain == 'y' || assessmentagain 'Y');
- }
- else if(choice == 4)
- {
- do
- {
- payment(WIP);
- printf("\nWould you like to print the payment info for another student? (Y/N)\n");
- scanf("\n%c", &paymentchoice);
- }
- while(paymentchoice == 'Y' || paymentchoice == 'y');
- }
- }
- int main() //The arrays are WIPs
- {
- char RegCheck = 'a'; char Username; int CUser = 0; int password; int addresstemp;
- char user[100]; char pass[100];
- char SName[1][100]; int SInfo[4][100];
- login(user, pass);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement