返回列表 發帖
回復 1# tonyh


    int main()
{
    float x,y,z;
    cout<<"<"梯形面積計算器"<<endl;
    cout<<"請輸入上底(公分):";
    cin>>x;
    cout<<endl;
    cout<<"請輸入下底(公分):";
    cin>>y;
    cout<<endl;
    cout<<"請輸入高(公分):";
    cin>>z;
    cout<<endl;
    cout<<"底為"<<x<<"公分,高為"<<y<<"公分的三角形,面積為"<<
      (x*y)/2<<"平方公分"<<endl;
    system("pause");
    return 0;

TOP

回復 3# 林宥辰


    #include<iostream>
using namespace std;
int main()
{
    float x, y, z;
    cout<<"梯形面積計算器"<<endl;
    cout<<"請輸入上底(公分):";
    cin>>x;
    cout<<endl;
    cout<<"請輸入下底(公分):";
    cin>>y;
    cout<<endl;
    cout<<"請輸入高(公分):";
    cin>>z;
    cout<<endl;
    cout<<"底為"<<x<<"公分,高為"<<y<<"公分的三角形,面積為"<<
      (x*y)/2<<"平方公分"<<endl;
    system("pause");
    return 0;
}

TOP

返回列表