Closed roberthsu2003 closed 9 months ago
#include <stdio.h>
int main(void) {
double bottom,height;
printf("請輸入三角形底和高(底,高):");
scanf("%lf,%lf", &bottom, &height);
printf("底是%.2lf,高是%.2lf\n", bottom, height);
printf("三角形面積是:%.2lf\n",bottom * height / 2.0 );
return 0;
}
#include <stdio.h>
int main(void) {
//三角形面積計算
double bottom, height;
printf("請輸入底,高(底,高):");
scanf("%lf, %lf", &bottom, &height);
printf("底是%.2lf, 高是%.2lf\n", bottom, height);
printf("三角形面積為: %.2lf\n", (bottom * height) / 2);
return 0;
}
#include <stdio.h> //籃上淵
int main(void) {
double bottom, height, area;
printf("請輸入三角型的底和高(底,高):\n");
printf("==============================\n");
printf("輸入三角形底");
scanf("%lf", &bottom);
printf("輸入三角形高");
scanf("%lf", &height);
area = bottom * height / 2;
printf("三角形面積%.2lf\n", area);
return 0;
}
#include <stdio.h>
double bottom, height;
int main(void) {
printf("請輸入三角型的底和高(底,高):");
scanf("%lf,%lf", &bottom, &height);
printf("三角型的底是:%.2lf \n", bottom);
printf("三角型的高是:%.2lf \n", height);
printf("三角型的面積是:%.2lf \n", bottom * height / 2.0);
return 0;
}
#include <stdio.h>
int main(void) {
double bottom,height,area;
printf("輸入bottom , height: ");
scanf("%lf ,%lf", &bottom ,&height);
printf("bottom: %.2lf height: %.2lf\n", bottom , height );
area=bottom * height / 2;
printf("area:%.2lf", area);
return 0;
}
#include <stdio.h>
int main(void) {
double bottom,height;
printf("請輸入三角型的底和高(底,高)");
scanf("%lf,%lf",&bottom,&height);
printf("三角形的底是:%.2lf\n",bottom);
printf("三角形的高是:%.2lf\n",height);
printf("三角形的面積是:%.2lf\n",bottom*height/2);
return 0;
}
int main(void) { double area,b,h; printf("請輸入三角形的底和高(底,高):"); scanf("%lf,%lf",&b,&h); printf("三角形的底是:%.2lf\n",b); printf("三角形的高是:.%.2lf\n",h); area=b*h/2; printf("三角形的面積是:%.2lf",area); return 0; }
int main(void) { double bottom,height; printf("請輸入三角型的底和高(底,高)"); scanf("%lf,%lf",&bottom,&height);
printf("三角形的底是:%.2lf\n",bottom);
printf("三角形的高是:%.2lf\n",height);
printf("三角形的面積是:%.2lf\n",bottom*height/2);
return 0; }
#include <stdio.h>
int main(void) {
double bottom,height;
printf("請輸入底,高(底,高):");
scanf("%lf,%lf",&bottom,&height);
printf("底是%.2lf,高是%.2lf",bottom,height);
printf("三角形面積是:%.2lf\n",bottom*height/2);
return 0;
}
#include <stdio.h>
int main(void) {
double bottom,height,area;
printf("請輸入三角形的底和高(底,高):");
scanf("%lf,%lf", &bottom, &height);
area=bottom*height/2;
printf("底是:%.2lf高是:%.2lf\n",bottom,height);
printf("三角形面積是:%.2lf\n",area);
return 0;
}
#include <stdio.h>
int main(void) {
double b;
double h;
double a;
printf("請輸入三角型的底和高(底,高):");
scanf("%lf,%lf",&b,&h);
printf("三角型的底是:%.2lf",b);
printf("三角型的高是:%.2lf",h);
a=b*h/2;
printf("三角型的面積是:%.2lf",a);
return 0;
}
請計算3角型的面績