#!/usr/bin/ruby total = 0; print "number = " n = gets.to_i for i in 1..n total += i end print "total = #{total}\n"