+ 1

How can we find minimum and maximum number and display in loop sequence of minimum to maximum

2nd May 2018, 8:42 AM
Riyaz Ali
Riyaz Ali - avatar
11 Respostas
+ 1
Riyaz Ali try setting the value of "max" before the for loop, i'm no java expert but i'm pretty sure an assignment operation can cause issues in a condition
2nd May 2018, 8:53 AM
hinanawi
hinanawi - avatar
+ 1
thanks hinanwi
2nd May 2018, 8:59 AM
Riyaz Ali
Riyaz Ali - avatar
0
if you're talking from an array, there are usually functions for finding max/min values then once you've found them, start a for loop from the minimum and the maximum and print out the current value of whichever variable you're using in said for loop
2nd May 2018, 8:47 AM
hinanawi
hinanawi - avatar
0
continues i have to print
2nd May 2018, 8:48 AM
Riyaz Ali
Riyaz Ali - avatar
0
Riyaz Ali continues? please elaborate
2nd May 2018, 8:49 AM
hinanawi
hinanawi - avatar
0
wait.. i inserting my code that make u understand what I am trying to say
2nd May 2018, 8:50 AM
Riyaz Ali
Riyaz Ali - avatar
0
can u debug the program plz
2nd May 2018, 8:54 AM
Riyaz Ali
Riyaz Ali - avatar
0
if you are making this program in GUI then we don't know in the number 1 the minimum value is set or maximum so whats the code required to identify the minimum or maximum value if it is unknown.. and we could display in loop
2nd May 2018, 8:58 AM
Riyaz Ali
Riyaz Ali - avatar
0
here, fixed your code, you can compare it to yours to see any errors you made https://code.sololearn.com/c8o2f2wlCCYx/?ref=app
2nd May 2018, 8:58 AM
hinanawi
hinanawi - avatar
0
exactly the same i want
2nd May 2018, 8:59 AM
Riyaz Ali
Riyaz Ali - avatar