代码语言:txt复制
n在{ }内定义,出了{ },n没了,所以while(n < 1)找不到n 代码语言:txt复制
%.2f,保留两位小数点 代码语言:txt复制
do
{
int n = get_int("Size: ");
}
while(n < 1);
n在{ }内定义,出了{ },n没了,所以while(n < 1)找不到nint x = get_int("x: ");
int y = get_int("y: ");
float z = (float) x / (float) y;
printf("%.2fn", z);
%.2f,保留两位小数点 int x = get_int("x: ");
int y = get_int("y: ");
printf("%fn", x / y);


