Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- main ()
- {
- int logggedIN[] = {1, 6, 10, 15, 100, 77, 500};
- int loginID[] = {1, 10, 100, 500};
- int itterate;
- int idSearch;
- int found = 0;
- printf("Admin interface - Type in your User ID to Login: ");
- scanf("%d", &idSearch);
- /*--------------------------------------------------------------
- IF Statements
- ****************************************************************/
- for (itterate = 0; itterate < 4; itterate++) // itterate++ is run every time
- {
- if (idSearch == loginID[itterate])
- {
- found = 1;
- break;
- }
- }
- if (found)
- {
- if (idSearch == 10)
- {
- printf("Welcome Administrator: %d", idSearch);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement