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

TOP

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

TOP

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    int x;
  6.    int y;
  7.    cout<<"三角形面積計算程式"<<endl;
  8.    cout<<"請輸入底(cm)"<<endl;
  9.    cin>>x;
  10.    cout<<"請輸入高(cm)"<<endl;
  11.    cin>>y;
  12.    cout<<"您輸入的長是"<<x<<"您輸入的高是"<<y<<endl;
  13.    cout<<"答案是..."<<endl;
  14.    cout<<x<<"*"<<y<<"/2="<<x*y/2<<endl;

  15.    system("pause");

  16.    return 0;

  17. }
複製代碼

TOP

返回列表