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