Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Name: Course: CSC 170- Computer Programming Section: 4. Write a void function wh

ID: 3721249 • Letter: N

Question

Name: Course: CSC 170- Computer Programming Section: 4. Write a void function which prints each of the numbers in an array, x, that are multiples of 3 and how many there are. The function accepts the array(&x;) and the number of elements in the array(size) as parameters. void printMult3 (int xil, int size) 5. 100 [41 75 121 131 101 a. What is this array called? b. How many elements can this array hold? What value is stored at the address 4 (141)? What address is-3 stored? d. array using one line C++ statement and initialized with the data values.

Explanation / Answer

4.

void printMult3 (int[] array , int size)
{
   int count=0;
   for(int i=0i<size;i++)
   {
       if(array[i]%3==0)
       {
           cout<<array[i]<<" ";
           count++;
       }
   }
   cout<<"there are "<<count<<" elements which are multiples of 3";
  
}

5. a. snow

b. 8

c. -100

d. 1

e. int snow[] = {8,-3,5,1,-100,75,0,-11};

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote