返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<cmath>
  4. using namespace std;
  5. int main()
  6. {
  7.     double x, y;
  8.     re:
  9.     cout<<"*****************"<<endl;
  10.     cout<<"請輸入底數: "<<endl;
  11.     cin>>x;

  12.     cout<<"請輸入指數: "<<endl;
  13.     cin>>y;
  14.     cout<<x<<"的"<<y<<"次方為: "<<pow(x,y)<<endl;
  15.     goto re;
  16. system("pause");
  17. return 0;   
  18. }   
複製代碼

TOP

返回列表