fix:menu,feat:main function

main
高世波 1 year ago
parent 049b3124cd
commit 88ef70152e

@ -0,0 +1,17 @@
#include "mysyslib.h"
int main(){
char ipt;
while(1){
ipt = mainMenu();
if(ipt=='i'){
}else if(ipt=='o'){
}else if(ipt=='m'){
}else if(ipt=='q'){
break;
}else{
continue;
}
}
return 0;
}

@ -10,10 +10,21 @@ char mainMenu() {
}
char ipt;
scanf("%c",&ipt);
switch(ipt){
case 'i':
printf("You are trying to Input info\n");
break;
case 'o':
printf("You are trying to Output info\n");
break;
case 'm':
printf("You are trying to Make things ordered\n");
break;
case 'q':
printf("You are about to Quit\n");
break;
default:
printf("Wrong input\n");
}
return ipt;
}
int main(){
mainMenu();
return 0;
}

Loading…
Cancel
Save