c语言 7-9

创建一个程序,输入一个实数作为面积,求面积为该实数的正方形的边长。

#include <stdio.h>
#include <math.h>

int main(void)
{
    double area;
    puts("please input the area.");
    printf("area = "); scanf("%lf", &area);
    
    printf("the length of the sige: %f.\n", sqrt(area));
    return 0;
}

 

 

posted @ 2021-05-20 11:25  小鲨鱼2018  阅读(58)  评论(0编辑  收藏  举报