Sha256: 236f2a38f30f81428ef1710d12f5346e36a4feca485576a957061ac5a32c42c0

Contents?: true

Size: 364 Bytes

Versions: 19

Compression:

Stored size: 364 Bytes

Contents

# -*- coding: utf-8 -*-
# 受け取った引数に応じたファイルを読み込んで出力

def method2(result)
  filename = "#{result}.rb"
  print File.read(filename)
end

# 受け取った引数を計算するメソッド

def method1(num0, num1)
  num0 * num1 % 6
end

num0 = ARGV[0].to_i
num1 = ARGV[1].to_i

result = method1(num0, num1)

method2(result)

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ruby_learner-1.2.9 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.8 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.7 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.6 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.5 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.4 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.3 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.2 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.1 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.2.0 contents/takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.15 takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.14 takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.13 takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.11 takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.10 takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.9 takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.8 takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.7 takahashi/sample_prog/final_check/test.rb
ruby_learner-1.1.6 takahashi/sample_prog/final_check/test.rb