int input; static int revers = 0; static int sum; static int i; public static void main (String [] args){ System.out.println("Enter the max number :"); int input = new Scanner(System.in).nextInt(); for(int i = 1;i <= input; i++){ System.out.print(" "+ i); } ////////////** I dont get this part where i should make the reverse for the i numbers till input... i = i * 10; i = i + input%10; input = input/10; sum = i + input; *///////////// System.out.println("\n Reverse of input number is: "+ revers); System.out.println("\n And the sum : "+ sum);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)