-->
当前位置:首页 > Eng

编程题:C程序设计 实验1-1程序改错

Luz3年前 (2022-11-28)Eng705
下面程序变量x、y、z赋初值2.5,然后在屏幕上打印这些变量的值。程序中存在错误,请改正错误,并提交正确的程序。
#include <stdio.h>
int main()

{


int x=y=2.5;

printf("These values are:\n" );

printf("x=%d\n",x);

printf("y=%d\n",y);

printf("z=%d\n",z);

return 0;

}


### 输出格式:

输出x、y、z的值时,每个变量占一行,并保留两位小数,

### 输入样例:

无需从键盘输入数据

in




### 输出样例:

out
These values are:
x=2.50
y=2.50
z=2.50








answer:若无答案欢迎评论