Solved

Given the Following Code Fragment and the Input Value of 2.0

Question 24

Multiple Choice

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

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions