Given the following code fragment and the input value of 2.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. 2.2
b. 2.0
c. 3.1
d. 4.4
b. 2.0
You might also like to view...
Which of the following is not true about Facebook app privacy?
A) Apps request permissions from users, and users generally click OK without really noticing what they are agreeing to. B) Facebook blocked the Whopper Sacrifice app soon after release due to privacy concerns. C) Facebook apps are allowed to track who has removed you as a friend. D) Users need to be concerned with privacy, especially if they are using an app that is not a mainstream one.
A(n) ________ chart displays two different types of data by using multiple chart types in a single chart object
A) Scatter B) combination C) column D) area
HTML tables are no longer widely used to control Web page layout.
Answer the following statement true (T) or false (F)
In most systems analysis tasks, time and people are interchangeable.
Answer the following statement true (T) or false (F)