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