Description
通过键盘输入整型数字x,计算x的平方并赋值给y,分别以“y = x ∗ x”和“x ∗ x = y”的形式输出x和y的值。
Input
输入整型数据x
Output
按照下列格式输出x和y的值。
y = x * x
x * x = y
#include<stdio.h>
int main()
{
int x, y;
scanf("%d",&x);
y=x*x;
printf("%d = %d * %d\n%d * %d = %d",y,x,x,x,x,y);
return 0;
}