|
|
back to boardWrong Answer? Posted by morm 24 Oct 2011 01:07 #include <iostream> #include <cmath> #include <vector> #include <iterator> #include <algorithm> using std::cout; using std::cin; using std::endl; using std::vector; inline double my_sqrt(int val) { return std::sqrt((double)val); } int main(int argc, char* argv[]) { vector<unsigned int> V; std::copy( std::istream_iterator<unsigned int>(cin), std::istream_iterator<unsigned int>(), std::back_inserter(V)); cout.precision(4); cout.setf(std::ios::fixed); std::transform(V.rbegin(), V.rend(), std::ostream_iterator<double>(cout, "\n"), my_sqrt); return 0; } What is wrong??? |
|
|