Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.01 KB

check-in-meeting.md

File metadata and controls

46 lines (38 loc) · 1.01 KB

CSE 142

Check-in Meeting

Week 2

Discussion

  • 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?

Expressions

  1. (238 % 10 + 3) % 7
  2. (18 - 7) * (43 % 10)
  3. 2 + 19 % 5 - (11 * (5 / 2))
  4. 813 % 100 / 3 + 2.4

Mystery variables

  1. What are the values of a, b, and c 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;
  1. What are the values of e, f, and g 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;

Programming

  1. Write a for loop that produces the following output:

1 4 9 16 25 36 49 64 81 100

  1. 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