Interview question.
Program to read the integers from the standard input (until it gets a negative number) and puts them in to an array.after that it calls process Array on the array,and then prints the content of the array on the standard output.
Curruntly ,processArray does not modify thearray.you have to changethis program so that any number in the array is replaced by -1 if it is an odd number,with -2 if it is greater then 50,and with -3 if it isan odd number greater then 50 .To do this you have to put your codeinside the processArray.Donot change anything else in the program
For Ex:
Input:
37
40
100
707
-1
output:
-1
40
-2
-3
View Answers
Ads
Related Tutorials/Questions & Answers:
Interview question.
Interview question. Program to read the integers from the standard input (until it gets a negative number) and puts them in to an array.after that it calls process Array on the array,and then prints the content of the array
Advertisements
Java Interview Question
Java
Interview Question Java program
Interview Question :i have a file which contains characters and integers in mixed format.
for example :-->
abd12 g156bcd etc
Now how would i rearrange the file sothat the characters
Interview question at Software AG
Interview question at Software AG write a program to print a string which take input from 0 to 9 like "0122233455" and give o/p as 0,1,2,3,4,5** in java .... Any one plz help me to solve this prog