作者在 2009-04-04 12:59:07 发布以下内容
#include<stdio.h>
main()
{
int a,b;
char c;
a=1;
b=3;
scanf("%s",&c);
if(c=1)
printf("you are beautiful \n");
else if(c=2)
printf("you are ugly \n");
else
printf("error \n");
getch();
}
为什么每次结果都是you are beautiful
main()
{
int a,b;
char c;
a=1;
b=3;
scanf("%s",&c);
if(c=1)
printf("you are beautiful \n");
else if(c=2)
printf("you are ugly \n");
else
printf("error \n");
getch();
}
为什么每次结果都是you are beautiful