Example: Hello World in Crystal
puts "Hello world!"
Output:
Hello world!
Example: Puts and Print in Crystal
Cystal supports both a put command and print command for output.
- puts adds a new line after the end.
- print does not add a new line.
puts "Hello Earth!"
print "Hello World!"
print "Hello Universe!"
Output:
Hello Earth!
Hello World!Hello Universe!