C / C++ / MFC
|Thank you this is what I was asking, just a start because I have litterally never written code in C++ only pseudocode. I am just trying to put together how each line will appear. He provided the entire program we have to fill in our solution. Here, I'll show you...
Objectives: using the iomanip library to format screen output.
Complete the provided main() program with statements to accomplish each of the following. In each case you must use the appropriate I/O stream manipulators to produce the appropriate output wherever possible. Refer to the sample output below as a guide for proper output alignment.
Output first first as an integer value, followed by a space, then in its written form.
Output second as a base ten value, followed by a space, then as a hexadecimal value, followed by a space, then as an octal value. Make sure the appropriate base indicator prefix is shown in the output.
Output fourth with four digits, with the sign shown at the left, and the value right aligned. The decimal point must also appear.
Output fourth with four significant figures.
Output fifth with seven significant figures. (Must be left-aligned)
Output fifth with three digits to the right of the decimal point.
Output fourth with two digits to the right of the decimal point.
Output sixth with no decimal portion showing
Output fourth with eight digits to the right of the decimal point.
Output sixth with six digits.
You must start your coding by using exactly the following program. You may not modify it, except to add the required code between the Solution starts, and Solution ends comments.
using namespace std;
cout << "Enter bool, int, long, float, float, and double values: ";
cin >> first >> second >> third >> fourth >> fifth >> sixth;
cout << endl;
// ***** Solution starts here ****
// ***** Solution ends here ****
SAMPLE PROGRAM OUTPUT (assume user inputs values shown in bold):
Enter bool, int, long, float, float, and double values:
1 69 1464878 6443.39 -7.273 -6443.39
69 0x45 0105
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.