1. 程式人生 > >c++實驗2

c++實驗2

#include <iostream>


using namespace std;


int main()
{
    double a,b,c,circu;
    cout<<"請輸入三條邊長:"<<"\n";
    cout<<"a=";cin>>a;
    cout<<"b=";cin>>b;
    cout<<"c=";cin>>c;
    circu=a+b+c;
    cout<<"周長為:"<<circu<<endl;
    return 0;
}

}