Mai mail ruby
You're looking for a simple "Hello, World!" program in Ruby!
Here it is:
puts "Hello, World!"
This will print "Hello, World!" to the console.
If you want to create a Ruby file and run it, you can do the following:
- Create a new file called
hello.rb
(or any other name you like, but with a.rb
extension). - Open the file in a text editor and add the following code:
puts "Hello, World!"
- Save the file.
- Open a terminal or command prompt and navigate to the directory where you saved the file.
- Run the file using the
ruby
command:ruby hello.rb
This will print "Hello, World!" to the console.
That's it! You've just written and run your first Ruby program.