wiley_pastebin

Lesson 1 control flow 7

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