Question: Suppose in a C + + program values are assigned to a string variable name and to a float variable amount. Then a while loop

Suppose in a C++ program values are assigned to a string variable name and to a float variable amount. Then a while loop is entered. The loop has to be executed as long as
name is not equal to "NOBODY" and
amount is not less than 10.00.
Which of the options below gives a correct condition for the loop?
((name!= "NOBODY") && (amount 10.00)
( name != "NOBODY")||(amount 10.00
(!(name == "NOBODY") && (amount 10.00))
!((name != "NOBODY") && (amount >=10.00)))
None of the options above is a correct condition.
Suppose in a C + + program values are assigned to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!