ruby get ascii value of character
# Step 1: Get user input for a character
puts "Enter a character:"
char = gets.chomp
# Step 2: Convert the character to its ASCII value using the ord method
ascii_value = char.ord
# Step 3: Display the ASCII value
puts "The ASCII value of '#{char}' is #{ascii_value}"