Problem 35

One comment on “Problem 35”


  • Akash

    JAVA CODE
    SABSE PEHLE TO EK COMPILER ADD KRIYE APNE PAGE PE
    Question yaha padho uske baad dusre jagah jake code kro
    _________________________________________________________________________

    public static void main (String[] args) throws java.lang.Exception
    {
    // your code goes here
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int max = 0;
    int min = 0;
    int[] a = new int[n];
    for(int i = 0; i < n;i++){
    a[i] = sc.nextInt();
    }
    for(int i = 0 ; i max){
    max = a[i];
    }
    }
    System.out.println(max);
    min = max;
    for(int i = 0 ; i < n; i++){
    if(a[i]<min){
    min = a[i];
    }
    }
    System.out.println(min);
    }