class number { void num(){ int a,b,c,d; int n=1957; a=n/1000; b=n/100%10; c=n/10%10; d=n%10; System.out.println(a+" "+b+" "+c+" "+d); } public static void main(String[] args) { number s = new number(); s.num(); } }
class number { void num(){ int a,b,c,d; int n=1957; a=n/1000; b=n/100%10; c=n/10%10; d=n%10; System.out.println(a+" "+b+" "+c+" "+d); } public static void main(String[] args) { number s = new number(); s.num(); } }