- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabs.java
More file actions
Latest commit
22 lines (19 loc) · 417 Bytes
/
Copy pathabs.java
File metadata and controls
22 lines (19 loc) · 417 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
packagejavatest;
importjava.util.Scanner;
publicclassabs {
publicstaticvoidmain(String[] args) {
Scannerabc=newScanner(System.in);
Stringa=abc.next();
ints=a.length();
System.out.println();
char[] h=newchar[10];
h[0]=a.charAt(s-1);
for(inti=1;i<s-1;i++) {
h[i]=a.charAt(i);
}
h[s-1]=a.charAt(0);
for(inti=0;i<s;i++) {
System.out.print(h[i]);
}
}
}