JSFiddle - React, Tailwind, and code Playground

JavaScript

var decimal = parseInt(prompt("Write your decimal number"));

var hex = decimal.toString(16).toUpperCase();
alert(hex);