-
#include<stdio.h>
-
int main()
-
{
-
int m = 23, n = 5;
-
printf("%d\n",!m + m % n);
-
return 0;
-
}
文字描述法
(1)定义并赋值m=23,n=5;
(2)输出!m+m%n的值;
代码 执行结果:
-
#include<stdio.h>
-
int main()
-
{
-
int x = 1, y = 2;
-
(x > y) && (--x > 0);
-
printf("%d\n",x);
-
return 0;
-
}
文字描述法
(1)定义并赋值x=1,y=2;
(2)计算(x>y)&&(--x>0);
(3)输出x的值;
代码 执行结果:
概念题15
#include<stdio.h>
#include<math.h>
int main()
{
int a=2 , b=2 ,c=4;
if (sqrt(fabs(a)) != (4 * a) / (b * c)) {
a = 2;
}
else {
printf("不构成");
}
printf("%d\n", a);
return 0;
}
文字描述法
(1)定义3个整数a,b,c;并给a赋值2,b赋值2,c赋值4;
(2)如果sqrt(fabs(a))!=(4*a)/(b*c);
(3)那么a=2;
(4)否则“不构成”;
(5)输出a的值;
代码 执行结果: