|
发表于 2018-3-8 17:38:47
|
显示全部楼层
你为什么说 “就是程序会直接跳过 int main ”
- #include <iostream>
- using std::cout;
- using std::endl;
- bool check(float, float, float);
- int main()
- {
- cout << "hh" << endl;
- for(float i = -100; i > 100; i++)
- for(float j = -100; j > 100; j++)
- for(float k = -100; k > 100; k++)
- {
- if(check(i, j, k) == true)
- {
- cout << i << j << j;
- }
- }
- cout << "就要执行 return 0; 了" << endl;
- return 0;
- }
- bool check(float a, float b, float c)
- {
- int number = ((a / (b + c)) + (b / (a + c)) + (c / (a + b)));
- int answer = 4;
- if(number == answer)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
复制代码
- hh
- 就要执行 return 0; 了
- 请按任意键继续. . .
复制代码 |
|