|
|
вернуться в форумHELP ME!!! What's wrong with it? (C++) #include <iostream> #include <math.h> #include <vector> #include <stdio.h> using namespace std; int main() { unsigned long long a; vector<unsigned long long> b; cin.clear(); while(cin>>a,!cin.eof()) { b.push_back(a); } for(vector<unsigned long long>::iterator it = b.begin() ; it != b.end(); ++it) { printf("%.4lld\n", sqrt(*it)); } return 0; } Edited by author 23.05.2014 07:23 Edited by author 23.05.2014 07:23 Re: HELP ME!!! What's wrong with it? (C++) It seems that you print numbers to right order, you should print them to reverse order. Like this: for (vector<...> : reverse_iterator it = b.rbegin(); it != b.rend(); ++t) ... |
|
|