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 45efdea commit b98f2a3Copy full SHA for b98f2a3
Easy-Level/SwapNumbers.java
@@ -0,0 +1,17 @@
1
+import java.io.*;
2
+import java.util.Arrays;
3
+public class Main {
4
+ public static void main (String[] args) throws IOException {
5
+ File file = new File(args[0]);
6
+ BufferedReader buffer = new BufferedReader(new FileReader(file));
7
+ String line;
8
+ while ((line = buffer.readLine()) != null) {
9
+ String[] a = line.split(" ");
10
+
11
+ for (int j = 0; j < a.length; j++) {
12
+ System.out.print(a[j].charAt(a[j].length()-1) + a[j].substring(1, a[j].length()-1) + a[j].charAt(0) + " ");
13
+ }
14
+ System.out.println();
15
16
17
+}
0 commit comments