#41499: c++提示


yp11351280@yphs.tp.edu.tw (810-43韓睿哲)


要用兩次fixed和setprecision:

cout << "|" << fixed << setprecision(4) << n << "|=" << fixed << setprecision(4) << n << endl ; 
        }
        else {
            cout << "|" << fixed << setprecision(4) << n << "|=" << fixed << setprecision(4) << -n << endl ;