fork(7) download
  1. #include <iostream>
  2. #include <string>
  3. #include <stdio.h>
  4. #include <math.h>
  5. #include <stdlib.h>
  6. using namespace std;
  7. int main()
  8. {
  9. float a;
  10. float b;
  11. float c;
  12. float d;
  13. float total;
  14. cout << "請輸入武器攻擊力" << endl;
  15. cin >>a;
  16. cout << "請輸入武器精練值" << endl;
  17. cin >>b;
  18. c=a*b*b;
  19. d=c/100;
  20. total=(a+b)+d;
  21. cout << "武器精練過所增加的攻擊力=" << total << endl;
  22.  
  23.  
  24. system("pause");
  25. return 0;
  26. }
Success #stdin #stdout #stderr 0s 4348KB
stdin
132
14
stdout
請輸入武器攻擊力
請輸入武器精練值
武器精練過所增加的攻擊力=404.72
stderr
sh: 1: pause: not found