wiley_pastebin

Lesson 1 control flow 4

Mar 15th, 2019
1,759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.15 KB | None | 0 0
  1. int[] nums = {9, 2, 1, 7, 3};
  2. int min = nums[0];
  3. int i = 1;
  4.  
  5. while(i < nums.length) {
  6.  if(nums[i] < min){
  7.   min = nums[i];
  8.  }
  9.  i++;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment