其他分享
首页 > 其他分享> > 14.3练习题1

14.3练习题1

作者:互联网

(a)

#include<stdio.h>

#define N(x) (x*x*x)

int main()
{
int x;
printf("请输入x的值: ");
scanf("%d",&x);
printf("x的立方是%d",N(x));
}

或者

#include<stdio.h>

#define N (x*x*x)

int main()
{
int x;
printf("请输入x的值: ");
scanf("%d",&x);
printf("x的立方是%d",N);
}

(c)

#include<stdio.h>

#define N(x,y) ((x*y)<100?1:0)

int main()
{
int x,y;
printf("请输入x的值: ");
scanf("%d",&x);
printf("请输入y的值: ");
scanf("%d",&y);
printf("输出是%d",N(x,y));
}

标签:练习题,include,14.3,int,scanf,printf,main,define
来源: https://www.cnblogs.com/migangchong/p/15872668.html