回复 楼主 王晓冬
#include<stdio.h>
#include<stdlib.h>
#include<windows.h>
int main()
{
int choice=0;
char film[16]=" 看电影\n";
char park[16]=" 逛公园\n";
char store[16]=" 逛商场\n";
char code[16]=" 一起写代码:P\n";
char love[16]=" 亲热一个\n";
char hug[16]=" 抱一个\n";
do
{
system("cls");
strcpy(film," 看电影\n");
strcpy(park," 逛公园\n");
strcpy(store," 逛商场\n");
strcpy(code," 一起写代码\n");
strcpy(love," 亲热一个\n");
strcpy(hug," 抱一个\n");
choice=(choice==5)?0:choice+1;
switch(choice)
{
case 0:film[0]='>';film[1]='>';break;
case 1:park[0]='>';park[1]='>';break;
case 2:store[0]='>';store[1]='>';break;
case 3:code[0]='>';code[1]='>';break;
case 4:love[0]='>';love[1]='>';break;
default:hug[0]='>';hug[1]='>';break;
}
printf(" <<<<Darling, 我们今天怎么玩呢?>>>>\n\n");
printf(film);
printf(park);
printf(store);
printf(code);
printf(love);
printf(hug);
printf("\n请按任意键停下来\n\n");
Sleep(120);
}while(!kbhit());
switch(choice)
{
case 0:printf("好耶!我们去看电影吧!");break;
case 1:printf("好耶!我们去逛公园吧!");break;
case 2:printf("好耶!我们去逛商场吧!");break;
case 3:printf("好耶!我们一起写代码吧!");break;
case 4:printf("好耶!我们来亲热一个吧!");break;
default:printf("好耶!我们来抱一个吧!");break;
}
getch();
return 0;
}