#!/usr/bin/ruby # coding: utf-8 #アップルバイを分割する際の角度を求める。10人まで対応 x = gets.chomp.to_i if x.integer? && 0 <= x && x < 10 then print"りんごパイの角度: " # 360÷xの結果を出力 puts 360 / x #printf("%d\n",360/x) else puts"エラー" end