fork 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 e;
  14. float f;
  15. float g;
  16. float h;
  17. cout << "請輸入基礎潛力" << endl;
  18. cin >>a;
  19. b=a-48;
  20. c=b-2;
  21. if (c>0)
  22. {
  23. d=c+121;
  24. e=d-30;
  25. f=e-101;
  26. g=230/e*f;
  27. h=130+g;
  28. cout << "成功率=" << h << "%" << endl;
  29. }
  30. else
  31. {
  32. cout << "不適用此公式" << endl;
  33. }
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. system("pause");
  41. return 0;
  42. }
Success #stdin #stdout #stderr 0s 4400KB
stdin
50
stdout
請輸入基礎潛力
不適用此公式
stderr
sh: 1: pause: not found