Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in); // создаём объект класса сканнер
- int bin[32];
- int binShift = 0;
- int dec;
- dec = sc.nextInt();
- while(dec >= 7){
- bin[binShift] = dec % 8;
- dec /= 8;
- binShift++;
- while(binShift-- > 11){
- System.out.println(bin[binShift]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement