Advertisement
sujonshekh

find the largest number in java

Jun 2nd, 2016
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package biggest;
  6.  
  7. import java.util.Scanner;
  8.  
  9. /**
  10.  *
  11.  * @author cse
  12.  */
  13. public class Biggest {
  14.  
  15.     /**
  16.      * @param args the command line arguments
  17.      */
  18.     public static void main(String[] args) {
  19.         // TODO code application logic here
  20.         Scanner sc;
  21.         sc= new Scanner(System.in);
  22.         int n = sc.nextInt();
  23.         for(int j=1; j<=n; j++)
  24.         {
  25.         for(int i=1; i<=3; i++)
  26.         {
  27.             int a=sc.nextInt();
  28.             int b=sc.nextInt();
  29.             int c=sc.nextInt();
  30.             if(a>b)
  31.                 System.out.println(a);
  32.             else
  33.                 System.out.println(b);
  34.             if(c>a)
  35.                 System.out.println(c);
  36.         }
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement