Step 2: Add code - AWS Cloud9

Step 2: Add code

(Previous step: Step 1: Install required tools)

  1. In the AWS Cloud9 IDE, create a new file (File, New File on the menu bar).

  2. Add the following code.

    puts "Hello, World!" puts "The sum of 2 and 3 is 5." argv0 = ARGV[0] argv1 = ARGV[1] sum = argv0.to_i + argv1.to_i puts "The sum of #{argv0} and #{argv1} is #{sum}."
  3. Save the file with the name hello.rb (File, Save).

Next Step

Step 3: Run the code