Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class test2 {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int num1;
- System.out.println("Enter a positive integer:");
- num1 = in.nextInt();
- while (num1 = 0 ){
- if (num1 % 2 = 0 ){
- System.out.print();
- num1 = num1 / 2;
- }
- else if (num1 % 2 = 1){
- System.out.print();
- num1 = num1 / 2;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement