Sha256: d56161b180af246f9d4591661e5b3ce4b16a8f1b9644b996ad151ed6173e2c12
Contents?: true
Size: 502 Bytes
Versions: 1
Compression:
Stored size: 502 Bytes
Contents
require "a15z8my_name/version" module A15z8myName class A15z8myName def calcBmi(h, w) begin if h.class() == Float exit(1) end rescue SystemExit $stderr.puts "input your height as cm" return false end w_h = h.to_f / 100 bmi = w / (w_h**2) best_weight = (w_h**2) * 22 $stdout.print "Your BMI : ", bmi.round(2), "\n" $stdout.print "Your Best Weight : ", best_weight.round(2), "\n" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
a15z8my_name-0.1.0 | lib/a15z8my_name.rb |