Question: shonld Problem #2: (20 pts] Write a program that prompts the user to enter the elements (integers) of an array of size 5. The program

 shonld Problem #2: (20 pts] Write a program that prompts the

shonld Problem #2: (20 pts] Write a program that prompts the user to enter the elements (integers) of an array of size 5. The program replace the numbers that are multiple of 3 by the element index in the array. For example, given the below array, 0 1 2 3 4 a 9 13 4 15 27 The first element is 9 and is multiple of 3, so the value is replaced by the array index. Here, the index is 0 The fourth element is 15 and is multiple of 3, so the value is replaced by the array index. Here, the index is 3. and so on. The array becomes. 1 2 3 4 I 0 0 1 13 4 3 4 Sample run Enter 5 array values: 14 -25 99 612 74 The new array is: 14-25 23 74 //hint: the numbors 99 and 642 are divisible by 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!