返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int x;
  6.     cout<<"請輸入圓的半徑:";
  7.     cin>>x;
  8.     cout<<"圓的面積是:"<<x*x*3.14<<endl;
  9.    
  10.     system("pause");
  11.     return 0;
  12. }
複製代碼

TOP

  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int x;
  6.     cout<<"***圓型面積計算程式***"<<endl;
  7.     cout<<"請輸入指定的半徑(公分):";
  8.     cin>>x;
  9.     cout<<"半徑"<<x<<"公分的圓,面積為"<<x*x*3.14<<
  10.     "平方公分"<<endl;
  11.    
  12.     system("pause");
  13.     return 0;
  14. }
複製代碼

TOP

返回列表