|
|
вернуться в форум1001. Обратный корень Послано George 23 окт 2011 00:29 While compiler write: "Wrong answer" On my PC answer is correct... #include <iostream> #include <math.h> #include <vector> using namespace std; int main() { double n; vector<double> v; while(cin >> n){ v.push_back(n); }
for(unsigned int i=v.size();i>0;i--) { cout.precision(4); cout<<fixed<<sqrt(v[i-1])<<endl; } return 0; } |
|
|