小米Ruby可以玩什么大型游戏 ruby编程实例案例可以编什么程序
小米Ruby可以玩什么大型游戏?
只要手机可以安装就可以玩。优点:1:屏幕没的说 OLE的屏幕在当时绝对能秒杀IPS屏 在阳光下看还是蓝色的。2:RAM 即使放在今天 也足够日常使用 3D游戏完全能够应付 3:纤薄的机身 非常轻。4:说说质量吧 手机摔了N次了,边框都摔得不像样了 但屏幕一直没碎。
ruby编程实例案例可以编什么程序
使用SciTE, or RadRails, or Eclipse编辑:
1. 计算器:
puts "Please input Number1:"
number1 = gets
puts "Please input a operator( ,-,*,/):"
op = gets
puts "Please input Number2:"
number2 = gets
case op.chomp
when " "
result = number1.to_i number2.to_i
when "-"
result = number1.to_i - number2.to_i
when "*"
result = number1.to_i * number2.to_i
when "/"
result = number1.to_i / number2.to_i
end
puts "Result: #{number1.chomp} #{op.chomp} #{number2.chomp} = #{result}"
====================================================================================
2.在项目中访问变量:
$qj="We can see the social progressing from the following phenomenon:"
class TestCL
CHANGE = "In changing..."
before = "We are living in the grass house"
now = "We are living in the tall buildings"
future = "We are living in the sky buildings"
puts CHANGE "
" $qj "
before : " before "
now :" now "
future :" future
end