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
Computer Science & Information Technology
You might also like to view...
Malware forensics is also known as internet forensics.
a. true b. false
Computer Science & Information Technology
What must developers enable on Android devices in order to install their applications?
a. ADTs b. Emulators c. Developer options d. Certificates
Computer Science & Information Technology