main function
void
main()
Implementation
void main() {
print('Enter a hexadecimal number:');
String hex = stdin.readLineSync()!;
int decimal = hexToDecimal(hex);
print('Hexadecimal: $hex');
print('Decimal: $decimal');
}