0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Ruby】プログラミングしてみました

0
Posted at

変数 N を 0 で初期化する
N に A を足した値を N へ代入する
N に B をかけた値を N へ代入する
N を C で割ったあまりを N へ代入する
N を出力する

という問題をプログラミングしました

ソースコード

nput_line = gets.chomp
array1 = input_line.split(' ')
N = 0
A = array1[0].to_i
N += A
B = array1[1].to_i
N *= B
C = array1[2].to_i
N = N % C
puts N
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?