Computer Science > QUESTIONS & ANSWERS > Flow of Control in java (All)
1. Write an if-else statement that outputs the word "High" if the value of the variable score is greater than 100 and outputs "Low" if the value of score is at most 100. The variable score is of typ... e int . 2. Suppose savings and expenses are variables of type double that have been given values. Write an if-else statement that outputs the word "Solvent", decreases the value of savings by the value of expenses , and sets the value of expenses to zero, provided that savings is larger than expenses . If, however, savings is less than or equal to expenses, the if-else statement should simply output the word "Bankrupt" without changing the value of any variables. [Show More]
Last updated: 1 year ago
Preview 1 out of 21 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Add to cartInstant download
We Accept:
Connected school, study & course
About the document
Uploaded On
Feb 07, 2023
Number of pages
21
Written in
This document has been written for:
Uploaded
Feb 07, 2023
Downloads
0
Views
40
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·