返回列表 發帖
  1. #include <iostream>

  2. using namespace std;

  3. int main()

  4. {

  5.     int x;

  6.     cout<<"請輸入圓的半徑"<<endl;

  7.     cin>>x;

  8.     cout<<"圓的面積是"<<x*x*3.14<<endl;

  9.     system("pause");

  10.   return 0;   

  11. }
複製代碼

TOP

  1. #include <iostream>

  2. using namespace std;

  3. int main()

  4. {

  5.     int x;
  6.     int y;

  7.     cout<<"請輸入高"<<endl;

  8.     cin>>x;

  9.     cout<<"請輸入底"<<endl;
  10.    
  11.     cin>>y;
  12.    
  13.     cout<<"面積為"<<x*y/2<<endl;
  14.      
  15. system("pause");

  16.   return 0;   

  17. }
複製代碼

TOP

返回列表