返回列表 發帖
  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.    
  10.    
  11.    
  12.    
  13.    
  14.    
  15.    
  16.    
  17.    
  18. system("pause");
  19.   return 0;   
  20. }
複製代碼

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.    
  10.     cout<<"請輸入高"<<endl;
  11.     cin>>y;
  12.    cout<<"三角形的面積是"<<x*y<<"平方公分"<<endl;
複製代碼

TOP

返回列表