CSE 142
- Have you finished the homework? Any questions?
- How are you feeling in class, are you stuck on any topics or do you have any questions?
- Have you been doing the readings?
(238 % 10 + 3) % 7
(18 - 7) * (43 % 10)
2 + 19 % 5 - (11 * (5 / 2))
813 % 100 / 3 + 2.4
- What are the values of
a
,b
, andc
after the following code is executed?
int a = 2;
int b = 4;
int c = 3;
int d = a + b;
a = c - d - a;
b = a;
c = a + c - b;
- What are the values of
e
,f
, andg
after the following code is executed?
int e = 1;
int f = 0;
int g = -11;
int h = e + f + g;
e = f - h;
f = e;
g = f * g - e;
- Write a for loop that produces the following output:
1 4 9 16 25 36 49 64 81 100
- Write a piece of code that uses a for loop to compute and print the first 12 Fibonacci numbers:
1 1 2 3 5 8 13 21 34 55 89 144