IHYPRESS.NET
RUBY
HOME | ASP | C | CSS | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
Ruby (CGI Programming) ❯ Numerical Expressions
<03>
#!/usr/bin/ruby print "Content-type: text/html\n\n" puts "<html><body style=font-size:1.6em;color:green;>" n = 2 + 4 + 6 + 8 n /= 5 m = 2 * 3 * 4 m -= n o = m % 3 + (n * n + 5.0) / m puts "The value of m is: " + m.to_s + "<br>" puts "The value of n is: " + n.to_s + "<br>" puts "The value of o is: " + o.to_s + "<br>" puts "</body></html>"
The value of m is: 20
The value of n is: 4
The value of o is: 3.05
COPYRIGHT © 2015-2024 IHYPRESS.NET. A DIVISION OF IHY PRESS. ALL RIGHTS RESERVED.