title: output is not correct(Swapping the first and last digit of a number)
body: <p>the output is almost correct except the first digit is not being removed.
  the code should swap the first and last digit of the number for example - if the input is 756 it should give 657 as output right now the code is showing 7657 the first digit is not being removed. –</p>
  <pre><code>package questionsOnLoops;
  import java.lang.Math; 
  import java.util.Scanner;
  
  public class OSJIDS {
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          
          Scanner srv = new Scanner(System.in);
          
          System.out.println(&quot;Enter any number: &quot;);
          int n = srv.nextInt();
          
          int temp = n; //input number
          int c = 0;
          int f =n; //first digit
          int l; //last digit
          int result;
          
          while(temp&gt;0) {
              temp = temp/10;
              c = c+1;
          }
          while(f&gt;=10) {
              f = f/10;
          }
          g = n%10;
          result = (n/10)*10+f;
          result = (int) ((result%Math.pow(10,c))+(g*Math.pow(10,c)));
          System.out.println(result);
      }
  
  }
  </code></pre>