Given the following code fragment and the input value of 4.0, what output is generated?
float tax;
float total;
cout << "enter the cost of the item\n";
cin >> total;
if ( total >= 3.0)
{
tax = 0.10;
cout << total + (total * tax) << endl;
}
else
{
cout << total << endl;
}
a. 3
b. 3.3
c. 4.0
d. 4.4
d. 4.4
You might also like to view...
The deployment of practices is supported by ____.
A. design B. management C. evaluation D. implementation
FIGURE OL 3-1
Referring to Figure OL 3-1 above, number 4 is pointing to the ____.
A. To-Do bar B. Task List C. Tasks folder button D. Meetings, appointments, and events
The ________ feature is used to view changes in cells that are not visible in the worksheet
A) Trace Precedents B) Formula Auditing C) Data Table D) Watch Window
Click the ____ icon to attach a database to the Recent Databases list so that it is always available.
A. Pin B. Attachment C. Paperclip D. Fix