返回列表 發帖
#include<iostream>
#include<cstdlib>
using namespace std;
int main(){
    float x,y;

cout<<"請輸入三角形的底(公分)";
cin>>x;
cout<<"請輸入三角形的高(公分)";
cin>>y;
cout<<"底"<<x<<"公分,高"<<y<<"公分的三角形,面積為"<<x*y/2<<"平方公分"<<endl;

system("pause");
return 0;

TOP

返回列表