Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class BinaryToDecimal {
- public static void main(String args[]){
- Scanner input = new Scanner( System.in );
- System.out.print("Angka biner: ");
- String binaryString =input.nextLine();
- System.out.println("Desimal : "+Integer.parseInt(binaryString,2));
- }
- }
Add Comment
Please, Sign In to add comment