7-108 将x的平方赋值给y (5分)
标签:rap ott star hit ali clu start flex printf
假设x的值为3,计算x的平方并赋值给y,分别以“y = x ? x”和“x ? x = y”的形式输出x和y的值。
本题无输入
按照下列格式输出代入x
=3的结果:
y = x * x
x * x = y
#include<stdio.h>
int main()
{
int x=3;
printf("%d = %d * %d\n",x*x,x,x);
printf("%d * %d = %d\n",x,x,x*x);
return 0;
}
标签:rap ott star hit ali clu start flex printf
原文地址:https://www.cnblogs.com/bigageyuan/p/13832515.html