求解
#include <stdio.h>#include <math.h>
int main()
{
unsigned int a , b , c;
a = 260;
b = 260;
printf("我的幸运数字:");
scanf("%d",&c);
if (c = 18 )
{
printf("%d",a + b);
}
else if (c <= 0)
{
printf("请填写正确的内容,司马仔");
}
else if (c = 66)
{
printf("您是天选之子吧");
}
return 0;
}
每次打印的都是520啊这怎么搞求解 #include <stdio.h>
#include <math.h>
int main()
{
unsigned int a , b , c;
a = 260;
b = 260;
printf("我的幸运数字:");
scanf("%d",&c);
if (c == 18 )// =号是赋值,==才是判断
{
printf("%d",a + b);
}
else if (c <= 0)
{
printf("请填写正确的内容,司马仔");
}
else if (c == 66)// =号是赋值,==才是判断
{
printf("您是天选之子吧");
}
return 0;
}
页:
[1]