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 the last digit is 7, with -2 if it is greater than 100, and with -3 if the last digit is 7 and greater than 100. To do this, you have to put your code inside processArray. Do not change anything else in the program.
For example, if these numbers were provided on the standard input:
77 50 101 707 -1
Then the program should print:
-1 50 -2 -3
Please read this example carefully to make sure you really, really understand what the program is supposed to do. If your submission is rejected by the system, it is very likely that you did not read the instructions properly, or did not study the example closely.
Please make sure of the following:
Please download only one of these programs: C Program or Java Program, and change it to create your program, and submit your changed program as your answer All your changes must be inside the processArray function/method. Do not make any changes to the rest of the program Copy paste the entire updated program in the space below. You must submit a full, working, program. Please compile, run, and check the output of your program before submitting it. If you're using C, please make sure to use only standard C. Do not use proprietary Microsoft or Turbo-C extensions. Specifically, do not use clrscr, getch, or conio.h. The processArray function/method should not print anything to the standard output. Any unnecessary printf/println/putchar will result in a program disqualification.