Due Monday, February 16, at the start of class. Be sure to do both sides.
s1 i = 0; s2 while (i < n) s3 { for (int j = 0; j < n; j++) s4 cout << "Hello world"; s5 i = i + 1; }
s1 for (int i = 1; i <= 6; i++) s2 for (int j = 1; j <= 10; j++) s3 cout << i * j << endl; s4 for (int k = 0; k < 1000; k++) s5 cout << "Hello" << end;
s1 cin >> n; s2 for (int i = 1; i <= n + 6; i++) s3 for (int j = 1; j <= n + 10; j++) s4 cout << i * j << endl; s5 for (int k = 1; k <= n + 1000; k++) s6 cout << "Hello" << end;
s1 while (n > 1) s2 { cout << n << endl; s3 n = n / 2; }
s1 cin >> n; s2 for (i = 1; i <= n; i++) s3 { temp = n; s4 while (temp > 0) s5 { cout << n * temp << endl; s6 temp = temp / 2; } }
s1 for ( i = 0; i < 10; i++) s2 { if (q == x[i]) s3 { cout << "q is in the array at position " << i; s4 return; } } s5 cout << "q is not in the array"