package zyntm;
import java.util.Scanner;
public class Users {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
int j = 0;
int[] arr = new int[3];
for (int i = 0; i < 3; i++) {
while(true) {
if (s.split("-")[i].charAt(j)>='0'&&s.split("-")[i].charAt(j)<='9')
arr[i]++;
else
break;
j++;
}
}
if (arr[0]==3&&arr[1]==2&&arr[2]==4)
System.out.println(s + "是一个合法的社保号");
else
System.out.println(s + "是一个不合法的社保号");
}
}
哪里有问题?如何修改?