CS 2073 Engineering Programming
|
You should also review your work for the programming assignments:
// initialize array named primes to the first 7 primes
int primes[] = {2, 3, 5, 7, 11, 13, 17};
Question: Use a for loop to add up the squares of the primes
stored in the array in 2 above. Print the sum.
Solution.
(Don't access until you've tried the problem.)
int a[25]; int i; for (i = 0; i < 25; i++) a[i] = 0;
Question: Here is a practice problem:
Problem involving arrays.
Solution.
(Don't access until you've tried the problem.)