title: Write a java program that reads an integer number made up of 4 digits, and prints the number in reverse
body: <p>Write a java program that reads (you must read it as an integer) an integer number made up of 4 digits, and prints the number in reverse order. For example if the number read is 7134 then your program will print 4317. (Hint use % and integer division).</p>
  
  <p>ANSWER --> </p>
  
  <pre><code>    Scanner s = new Scanner(System.in);
  
      int n;
      int reverse1;
      int reverse2;
      int reverse3;
      int reverse4;
  
      System.out.println("Please enter a number made up of 4 digits : ");
      n = s.nextInt();
  
      reverse1 = (((n % 1000) % 100) % 10);
      reverse2 = (((n % 1000) % 100) / 10);
      reverse3 = ((n % 1000) / 100);
      reverse4 = ((n / 1000));
  
      System.out.print("The number in reverse order : ");
      System.out.print(reverse1);
      System.out.print(reverse2);
      System.out.print(reverse3);
      System.out.print(reverse4);
  </code></pre>