|
|
вернуться в форумwhat's wrong with it? #include<iostream> #include<stack> #include<math.h> #include<iomanip> float next_value = 0; std::stack<float> my_stack; int main() { int a = 0; while (std::cin >> next_value) { if (a == 65536) break; if (0 <= next_value && next_value <= pow(10.0, 18)) { my_stack.push(next_value); } else continue; a++; } while (!my_stack.empty()) { std::cout << std::fixed << std::setprecision(4) << sqrt(my_stack.top()) << std::endl; my_stack.pop(); } return 0; } |
|
|