-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu2.cpp
63 lines (57 loc) · 1.49 KB
/
menu2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
int main(){
int i;
char *com1 = "Viewall";
char *com2 = "Checkstatus";
char *com3 = "Viewassignment assignmentid";
char *com4 = "Checkdates datefrom dateto";
char *com5 = "RequestActivation";
char com[strlen(com3)];
char option;
for(i = 0; i < 100; i++)
printf("=");
printf("\n\t\t\tWelcome to the KinderCare Character Draw System.\n");
for(i = 0; i < 100; i++)
printf("=");
while(option != '1')
{
printf("\nPlease Enter any of the following commands to proceed.");
printf("\n1. Viewall");
printf("\n2. Checkstatus");
printf("\n3. Viewassignment assignmentid");
printf("\n4. Checkdates datefrom dateto");
printf("\n5. RequestActivation\n\n");
printf("Enter command here(for example \"Viewall\" to view assignments): ");
scanf("%s", &com);
if(strcmp(com, com1)==0){
printf("\nYou have selected option ");
puts(com1);
}
else if(strcmp(com, com2)==0){
printf("\nYou have selected option ");
puts(com2);
}
else if(strcmp(com, com3)==0){
printf("\nYou have selected option ");
puts(com3);
}
else if(strcmp(com, com4)==0){
printf("\nYou have selected option ");
puts(com4);
}
else if(strcmp(com, com5)==0){
printf("\nYou have selected option ");
puts(com5);
}
else{
printf("\nYou have selected an invalid option. Try again.");
}
printf("\nEnter 1 to quit or any other character to continue: ");
getchar();
option = getchar();
}
return 0;
}