c语言问题:如果输入Y 则输出正确;如果输入N 则输出错误。怎么写?
我自己写的部分:#include<stdio.h>main(){chara;printf("DoyouthinkI'mabeautifulgirl?(Y/N)\n");s...
我自己写的部分:
#include <stdio.h>
main()
{
char a;
printf("Do you think I'm a beautiful girl? (Y/N)\n");
scanf("%c",&a);
if(写不来了)
printf("You are right.\n");
else
printf("You are wrong.\n");
} 展开
#include <stdio.h>
main()
{
char a;
printf("Do you think I'm a beautiful girl? (Y/N)\n");
scanf("%c",&a);
if(写不来了)
printf("You are right.\n");
else
printf("You are wrong.\n");
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询