#14169: 為麼不能用fixed+setprecision


koukiBOB (MVP Harden)


居然NA(0%)

 

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
double a,b,c;
while(cin>>a>>b>>c){cout<<fixed<<setprecision(c)<<a/b<<endl;}
}

#14898: Re:為麼不能用fixed+setprecision


linhunghsiang (呆瓜)


居然NA(0%)

 

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
double a,b,c;
while(cin>>a>>b>>c){cout<<fixed<<setprecision(c)<<a/b<<endl;}
}



丟 2 3 4 進去看看(?

N位後要無條件捨去