|  | 
|  | 
| вернуться в форум | C++ What's wrong? Послано Ilia  28 окт 2020 20:48#include <iostream>#include <vector>
 #include <cmath>
 using namespace std;
 
 int main()
 {
 double val = 0;
 vector<double> v;
 char ch = 0;
 
 while (cin >> val)
 {
 v.push_back(val);
 }
 for (int i = 0; i < v.size(); i++)
 {
 cout << sqrt(v[i]) << endl;
 }
 }
Re: C++ What's wrong? Послано MaXX74  29 окт 2020 01:28OK. Read this carefully: "For each number Ai from the LAST one till the FIRST one..."Re: C++ What's wrong? Послано Agyn  20 фев 2022 01:03Second for loop cout from last element of the vector to first | 
 | 
|