/*---- signature: print_nums: int[] int -> void purpose: expects an array of integers and its size, has the effect of printing its values to the screen, one per line, and returns nothing. tests: int worm_sizes[3] = {2, 7, 1}; if I run: print_nums(worm_sizes, 3); then printed to the screen should be: 2 7 1 int food_quants[4] = {10, 4, 7, 38}; if I run: print_nums(food_quants, 4); then printed to the screen should be: 10 4 7 38 by: Sharon Tuttle last modified: 2022-09-13 ----*/ #include <cstdlib> #include <iostream> #include <string> #include <cmath> using namespace std; void print_nums(const int my_nums[], int size) { // print each integer in my_nums on its own line for (int i=0; i < size; i++) { cout << my_nums[i] << endl; } }