ITM 200 Chapter 5: Chapter 5

65 views5 pages

Document Summary

If some students have been given their marks for an exam (out of 100) and need to know whether they have passed (scored 40 or more: you would have to write the following pseudoccode first, 1. Get the mark from the student: 2. If it is greater than the pass mark, tell them they have passed. else tell them they have failed: 3. If 2 operators are at the same level of precedence then they are evaluated from left to right: for example, 3 * 2/4, evaluates to 1 not 0. 5. 3 the if-else statement the details: syntax of the java if-else statement is, if () Semantics of the if-else statement: when java virtual machine comes to an if-else statement, first thing that happens is that. If is true then is performed. If is false then is performed. 5. 4 compound statements: by default, if-else statement contains just 1 statement to be performed www. notesolution. com.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions