|
|
вернуться в форумWhy wrong?? C++ It's ok on my Dev c++.. #include<stdio.h> #include<cmath> #include<vector> using namespace std; vector <double> v; int main() { double c; while(scanf("%lf",&c) != EOF) v.push_back(c);
for(vector <double>::iterator it=v.begin(); it != v.end(); it++) printf("%.4lf\n",sqrt(*it)); } Re: Why wrong?? C++ It's ok on my Dev c++.. may be > for(vector <double>::reverse_iterator it=v.rbegin(); it != v.rend(); it++) > printf("%.4lf\n",sqrt(*it)); ? |
|
|