Advertisement
Guest User

Untitled

a guest
Sep 8th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.66 KB | None | 0 0
  1.     public static void main(String[] args) {
  2.     int inputedValue1;
  3.     int inputedValue2;
  4.     int Counter = 1;
  5.    Scanner input = new Scanner(System.in);
  6.    
  7.    for (; Counter <= 10; Counter+=1) {
  8.     System.out.print("Enter an integer value: ");
  9.     inputedValue1 = input.nextInt();
  10.    
  11.    
  12.       for (; Counter <= 10; Counter+=1) {
  13.              System.out.println("Enter an interger value: ");
  14.     inputedValue2 = input.nextInt();
  15.  
  16.     if (inputedValue2 > inputedValue1) {
  17.         inputedValue1 = inputedValue2;
  18.         boolean trueOrFalse = true;
  19.         Counter+=1;
  20.        
  21.         if (trueOrFalse) {
  22.             System.out.println ("The highest value is :" + inputedValue2);
  23.          
  24.         }
  25.       }
  26.       }
  27.    }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement