Write a Program to Print the Contents of the Array



Write a Program to Print the Contents of the Array

Consider this C Program or Java Program. It reads integers from the standard input (until it gets a negative number) and puts them into an array. After that it calls processArray on the array, and then prints the contents of the array on standard output.

Currently, processArray does not modify the array. You have to change this program so that any number in the array is replaced by -1 if it divisible by 7, with -2 if it is greater than 100, and with -3 if it is divisible by 7 and greater than 100. To do this, you have to put your code inside processArray. Do not change anything else in the program.

Asked by: Geetika on Jul 25, 2019.EDIT

Be the first to answer this Question !

Your Answer :

Name *:

Email *: (Required but will not be displayed)

» Your answers will be displayed only after manual approval.

Related Questions


No related questions found for this page.

Sponsored Links


Current Affairs

Quick Links