|
|
back to boardC++ What's wrong? Posted by Ilia 28 Oct 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? Posted by MaXX74 29 Oct 2020 01:28 OK. Read this carefully: "For each number Ai from the LAST one till the FIRST one..." Re: C++ What's wrong? Posted by Agyn 20 Feb 2022 01:03 Second for loop cout from last element of the vector to first |
|
|