clear //Variable declaration n=7046 //Hex number //Calculations h = dec2hex(n) //decimal to hex conversion //Result printf ("The hexadecimal equivalent of 7046 is %s ",h)