|
|
back to threadReply to message- Messages should be written in English and correspond to the matter of the website.
- Messages should not contain offences and obscene words.
- Messages should not contain correct solutions.
can anyone tell me why WA?(C++) #include <iostream> #include<vector> #include<iomanip> #include <math.h> using namespace std; int main() { double a; vector<double> vd; while(cin>>a) { vd.push_back(a); } cout.setf(cout.showpoint); setprecision(4); setiosflags(ios::fixed); for(vector<double>::size_type i=vd.size()-1;i!=-1;--i) { cout<<pow(vd[i],0.5)<<endl; } return 0; }
|
|
|