Question

Q3. if (total > 100) and (count - 10) then add value to total endir Q5. if(value <= 50 or value >= 100) then value = 0 endif;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Q3)

If the total value is greater than or equal to 100, and count value is 10, then we are adding value to total.

Equivalent code can be written in C or Java like below:

--------

if(total>=100 && count == 10)

total += value;

-----------

Note : In order to excute body of the if loop both conditions must be true, because we are using '&&' here.

----------------------------------------------

Q4)

If the value is less than or equal to 50 or the value greater than or equal to 100, then we are making/set the value as 0.

Equivalent Java)C code:

---------

if( value<=50 || value>=100)

value = 0;

-------

Here operator || is used for checking for condition checking , if any of the one condition satisfies , then if loop executes. The values that satifies the above conditions are numbers below 50 and numbers above 100.

Add a comment
Know the answer?
Add Answer to:
Q3. if (total > 100) and (count - 10) then add value to total endir Q5....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT