We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da9e3e3 commit 08dcec3Copy full SHA for 08dcec3
Partial reverse.java
@@ -0,0 +1,28 @@
1
+/******************************************************************************
2
+
3
+ Online Java Compiler.
4
+ Code, Compile, Run and Debug java program online.
5
+Write your code in this editor and press "Run" button to execute it.
6
7
+*******************************************************************************/
8
9
+public class Main
10
+{
11
+ public static void main(String[] args) {
12
13
+ int n=123456;
14
+ int revn=0;
15
+ int size=3;
16
17
18
19
+ while(size>0){
20
+ int rem=n%10;
21
+ n=n/10;
22
+ revn=revn*10+rem;
23
+ size--;
24
+ }
25
+ System.out.print(n+""+revn);
26
27
28
+}
0 commit comments