(Solved) : Add Iomanip Setprecision Fixed Setw Minimum Left Right Wish Following Code Code Output Sho Q44056748 . . .
Add iomanip, setprecision(), fixed, setw() at minimum and leftand right if you wish to the following code so that the code isoutput as shown. In particular notice that the decimal points lineup.
Add iomanip, setprecision(), fixed, setw() at minimum and left and right if you wish to the following code so that the code is output as shown. In particular notice that the decimal points line up. #include <iostream> using namespace std; int main() //utility-type expenses double pge = 247.5, xfinity = 186.5, garbage = 105, att = 77.40, water = 141.78; double total; // calculate total total = Pge + xfinity + garbage + att + water; //Output expenses cout << “PG&E” << pge << endl; cout << “TV and Internet” << xfinity << endl; cout << “Waste Management” << garbage << endl; cout << “cell devices” << att << endl; cout << “water” << water << endl; cout << “. –______-” <<endl; cout << “Total” << total << endl; return ; So that the output appears like: PG&E TV and Internet Waste Management Cell devices Water 247.50 186.50 105.00 77.40 141.78 Total 758.18 Show transcribed image text Add iomanip, setprecision(), fixed, setw() at minimum and left and right if you wish to the following code so that the code is output as shown. In particular notice that the decimal points line up. #include using namespace std; int main() //utility-type expenses double pge = 247.5, xfinity = 186.5, garbage = 105, att = 77.40, water = 141.78; double total; // calculate total total = Pge + xfinity + garbage + att + water; //Output expenses cout
Expert Answer
Answer to Add iomanip, setprecision(), fixed, setw() at minimum and left and right if you wish to the following code so that the c…
OR