import java.util.Random;public class odev2 {
/** * */ public static void main(String[] args) { Random rnd = new Random(); System.out.println(“Welcome , Generating Phone Number”); for (int i = 0; i < 1 ; i++) { int addn = rnd.nextInt(10); int firstn = rnd.nextInt(9); int secn = rnd.nextInt(90)+10; int thirt = rnd.nextInt(643)+100; int five = rnd.nextInt(100); int six = rnd.nextInt(100); if (firstn == 0 ) firstn = firstn +2; if (firstn == 1 ) firstn = firstn +1; if (firstn == 8 ) firstn = firstn -1; if (firstn == 9 ) firstn = firstn -3; System.out.print(firstn); System.out.print(secn ); System.out.print(” ” + thirt ); if (five < 10 ) System.out.print( ” 0” + five); else System.out.print( ” ” + five); if (six < 10 ) System.out.print( ” 0” + six ); else System.out.print( ” ” + six); }
}
}
Design by Simon Fletcher. Tumblr kaynaklı.
© Copyright 2010