如何在不使用字母或数字的情况下使用单词或短语制作选项菜单?

时间:2018-08-27 00:41:14

标签: switch-statement case

enter image description here

enter image description here

printf("What account do you need ?\n");
scanf("%s", &youtube, &google);

if(strcmp(youtube, "youtube") == 0) {   
    printf("youtube password\n");
    system("pause");
    system("cls");
    exit(0);
}

if(strcmp(google, "google") == 0) {
    printf("google password ");
    system("pause");
    system("cls");
    exit(0);
}

if(strcmp(reddit, "reddit") == 0) { 
    printf("reddit password ");
    system("pause");
    system("cls");
    exit(0);        
}

0 个答案:

没有答案