I am wring program that sorts three integers.But I am not getting result for the input {1,3,2}.Probably some logic mistake in the 4th if statement : // program to sorting 3 double.

import java.util.*;

public class Sorting {

public static void main ( String [] args){

Scanner in= new Scanner(System.in);

System.out.println("Input the numbers for sorting");

    double num1=in.nextDouble();
    double num2=in.nextDouble();
    double num3=in.nextDouble();

    double a=0;
    double b=0; 
    double c=0;

    if((num1>num2)&&(num2>num3)){

	a=num1;
	b=num2;
	c=num3;
    } 

   if ((num1>num2)&&(num3>num2)){

	  a=num1;
	  b=num3;
	  c=num2;
   }

   if ((num2>num1)&&(num1>num3)){

	  a=num2;
	  b=num1;
	  c=num3;
  }

  if ((num2>num1)&&(num3>num1)){
		
	 a=num2;
	 b=num3;
	 c=num1;
  }

 if ((num3>num1)&&(num1>num2)){

	a=num3;
	b=num1;
	c=num2;
  }

  if ((num3>num1)&&(num2>num1)){

	 a=num3;
	 b=num2;
	 c=num1;
  }
System.out.println(" The numbers are in" +c+"< "+b+ "< " +a);

	}

	}