當前位置:首頁 » 編程軟體 » 對角編程

對角編程

發布時間: 2023-08-06 13:46:29

『壹』 求C語言編程矩形面積周長對角線

#include "stdio.h"
//面積
double area(double len,double wid){return len*wid;}
//周長
double circle(double len,double wid){return 2*(len+wid);}
//對角線
double ijiaoxian(double len,double wid){return sqrt(len*len+wid*wid);}
void main()
{
printf("請輸入長寬:\n");
double length,width;
scanf("%f%f",&length,&width);
printf("面積為:\n",area(length,width));
printf("周長為:\n",circle(length,width));
printf("對角線長為:\n",ijiaoxian(length,width));
}

熱點內容
王者鍵盤怎麼設置安卓 發布:2025-02-05 10:32:01 瀏覽:371
阿里雲輕量伺服器ip搭建 發布:2025-02-05 10:24:46 瀏覽:486
編程高精度 發布:2025-02-05 10:22:28 瀏覽:230
使命召喚如何配置爆炸狙 發布:2025-02-05 10:08:12 瀏覽:143
java訪問共享目錄 發布:2025-02-05 10:03:56 瀏覽:279
行車記錄儀存儲卡多大合適 發布:2025-02-05 09:35:21 瀏覽:110
oppo手機鎖屏密碼忘了怎麼辦 發布:2025-02-05 09:33:50 瀏覽:122
phprsa演算法 發布:2025-02-05 09:33:48 瀏覽:229
快寫編譯器 發布:2025-02-05 09:29:15 瀏覽:590
java隨機驗證碼 發布:2025-02-05 09:27:45 瀏覽:637