Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaSyntax;
- import java.util.Scanner;
- public class Ex5_DecimalToHexadecimal {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int number = in.nextInt();
- System.out.println(Integer.toHexString(number).toUpperCase());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement