CSC 1100 Lecture 5: CSC1100-DanO-Session05Notes-2019-0122

19 views10 pages

Document Summary

The homework 1 key is available on canvas. An assignment statement places a value into a variable. The equals sign means "gets the value of". See variable declarations and assignment statements sample application on. Any combination of arithmetic operators may be used to calculate numeric values. The division operator (/) will give an integer result if both operands are integer. This may be overridden by casting one of the operands to a real-number data type. See division operator sample application on canvas. If an expression contains more than one arithmetic operator, the order of precedence determines how the expression is evaluated. Operators at the same precedence level are evaluated from left to right. See arithmetic expressions sample application on canvas. The following compound operators are available but should not be used because they are not as readable: Compound operator usage x += 2; x = 2; x *= 2; x /= 2; x %= 2;

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents