Assignment: #CodeSnippets0 Points: 0 Due: 04/30/02018
/*
 * Execute the following code snippets by hand and record
 * what the outputs would be if executed by the computer.
 * Pretend you are a computer. Typing these code snippets
 * into a computer defeats the purpose of this assignment.
 */

/* exercise 0 */
int b = 2;
int p = 5;
int m = 1;
while (p) {
   m *= b;
   p--; 
}
cout << m;

/* exercise 1 */
int x = 30;
int y = 30;
int i = 0;
do {
   if (i * 10 == x)
      x = -y;
   i++;
} while (x == y);
cout << i;

/* exercise 2 */
int a = 80;
for (int b = 0; b < a; b = b + 20)
   if (b)
      cout << a / b << endl;

/* exercise 3 */
if (19 / 10 == 6 / 5)
   cout << "yes";
else
   cout << "no";