一个好玩的程序

Posted on 2006-07-31 13:16  abcdeft  阅读(810)  评论(2)    收藏  举报
#include<stdio.h>
#include<conio.h>
void main()
{
   int i=1;
   char c;
   while(i==1)
   {
     printf("Do you love me?\n");
     printf("choose Y or N:\n");
     scanf("%c",&c);
      if(c=='Y'||c=='y')
       {
  printf("I'll be a good boy!\n");
  i=0;
       }
    }
   printf("\n\n");
   getch();
}