Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Программа выводит разряды числа (123 = 3,2,1)
- */
- public class Test3 {
- public static void main(String[] arg) {
- int a = 123456;
- int b = 0;
- for (int i = 0; i < 6; i++) {
- b = a % 10;
- a = a / 10;
- System.out.print(b + " ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment