Skip to content

Commit 9f67e45

Browse files
committed
It was a little bit tricky.pleas check if correct
1 parent 5abd1c3 commit 9f67e45

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
package classes;
7+
import java.util.Scanner;
8+
/**
9+
*
10+
* @author Samuel Edward
11+
*/
12+
public class Seperater {
13+
14+
public static void main(String args[]) {
15+
int num;
16+
String [] arr = {};
17+
18+
Scanner sc = new Scanner( System.in);
19+
System.out.print("Enter a long number: ");
20+
num = sc.nextInt();
21+
22+
String value = String.valueOf(num);
23+
24+
for (int i = 0; i <= value.length(); i++) {
25+
String temp = value.substring(i);
26+
temp = arr[i];
27+
}
28+
29+
System.out.print("The Number you entered is: ");
30+
31+
for(int i = 0; i <= value.length(); i++) {
32+
System.out.println(arr[i]);
33+
}
34+
35+
36+
37+
}
38+
39+
}

0 commit comments

Comments
 (0)