wiley_pastebin

Lesson 1 control flow 6

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