Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class _05_DecimalToHexadecimal {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- System.out.print("Enter number: ");
- int num1 = sc.nextInt();
- System.out.printf("Hexadecimal: %X", num1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement