新手*_* 用c语言写一个算正方形面积和周长的程序
#include<stdio.h>intmain(void){floatside=0.0f;printf("Inputthesideofthetable:");scanf...
#include<stdio.h>
int main(void)
{
float side = 0.0f;
printf("Input the side of the table:");
scanf("%f", &side);
circumference = 4.0f*side;
area =side*sidse;
printf("\nThe circumference is %.2f",circumference);
printf("\nThe area is %.2f\n",area);
return 0;
}
哪里错了,求指点。。。。 展开
int main(void)
{
float side = 0.0f;
printf("Input the side of the table:");
scanf("%f", &side);
circumference = 4.0f*side;
area =side*sidse;
printf("\nThe circumference is %.2f",circumference);
printf("\nThe area is %.2f\n",area);
return 0;
}
哪里错了,求指点。。。。 展开
2个回答
展开全部
#include<stdio.h>
int main(void)
{
float side = 0.0f;
float circumference;
float area;
printf("Input the side of the table:");
scanf("%f", &side);
circumference = 4.0f * side;
area = side * side;
printf("\nThe circumference is %.2f", circumference);
printf("\nThe area is %.2f\n", area);
return 0;
}
忘记声明变量,还有拼写错误
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |