亲亲亲,请问我的代码哪里错了呢#include <stdio.h>
void main()
{
double s;
double width,height;
printf("请输入长方形的长和宽");
for(;;)
{
scanf("lf,lf",&width,&height);
if(width<=0||height<=0 )
{
printf("输入不能为负,请重新输入");
}
else
{
break;
}
}
s=width*height;
printf("长方形的面积为:%lf",s);
}
void main()
{
double s;
double width,height;
printf("请输入长方形的长和宽");
for(;;)
{
scanf("lf,lf",&width,&height);
if(width<=0||height<=0 )
{
printf("输入不能为负,请重新输入");
}
else
{
break;
}
}
s=width*height;
printf("长方形的面积为:%lf",s);
}