Guest User

Untitled

a guest
Feb 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package BASICJAVA;
  7.  
  8. import java.util.Scanner;
  9.  
  10. /**
  11. *
  12. * @author ABIR
  13. */
  14. public class Finding_large_into_array {
  15. public static void main(String[]args){
  16. Scanner abir =new Scanner(System.in);
  17. int[] number=new int[5];
  18. for (int i = 0; i < number.length; i++) {
  19. System.out.println("Enter your "+(i+1)+" number");
  20. number[i]=abir.nextInt();
  21. }
  22. int result=0;
  23. for (int i = 0; i < number.length; i++) {
  24. if (number[i]>result) {
  25. result=number[i];
  26. }
  27. }
  28. System.out.println("Highest Number is "+result);
  29. }
  30. }
Add Comment
Please, Sign In to add comment