Chapter 2: Problem 22
Suppose savings and expenses are variables of type double that have been given values. Write an \(i f\) -else statement that outputs the word Solvent, decreases the value of savings by the value of expenses, and sets the value of expenses to \(0,\) provided that savings is at least as large as expenses. If however, savings is less than expenses, the \(i f\) -else statement simply outputs the word Bankrupt, and does not change the value of any variables.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.