0

I want to display the most less number in my code. I don't know what can i do if the first number is less than the second? Thank

Min number array display. https://code.sololearn.com/cvEQfaqX4XE6/?ref=app

19th May 2020, 6:20 AM
Malick Diagne
Malick Diagne - avatar
1 Respuesta
0
public class Program { public static void main(String[] args) { int tmp [] = {5,8,9,3} ; System.out.println (tmp[2]); int min = tmp[0]; for (int i=1; i<tmp.length; i++) { if(tmp[i]<min) min = tmp[i]; } System.out.println (min); } } Try this.. You'll get your answer
19th May 2020, 6:24 AM
sarada lakshmi
sarada lakshmi - avatar