-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfix.java
46 lines (44 loc) · 1.1 KB
/
fix.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package KserOS;
import java.util.*;
public class fix
{
static void main(String n)
{
n="."+n;
String[] digits=new String[n.length()];
int firstin=0;
int secondin=0;
int check=0;
char a=' ';
String number="";
int check1=0;
for(int lp=0;lp<n.length();lp++)
{
a=n.charAt(lp);
//".7546.8932.8903="
if(a=='.')
{
if(check==0)
{
firstin=lp+1;
check=1;
}
else if(check==1)
{
secondin=lp;
System.out.println();
digits[check1]=n.substring(firstin,secondin);
lp=lp-1;
System.out.println(digits[check1]);
check=0;
}
}
else if(a=='=')
{
secondin=lp;
digits[check1]=n.substring(firstin,secondin);
System.out.println(digits[check1]);
}
}
}
}