repo.or.cz
/
rwork.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
just update
[rwork.git]
/
obsahy.rb
blob
a08da9452ee36502832a97fc5b9496dfdacafd3a
1
puts "Zadaj cislo, hocijake...:"
\r
2
a=gets.chomp
\r
3
\r
4
a=a.to_f
\r
5
\r
6
#### vzorce objektov#######
\r
7
\r
8
stvorec=a*a
\r
9
kruh=3.14*a*a
\r
10
kocka=a*a*a
\r
11
gula=4/3*3.14*a*a*a
\r
12
\r
13
##### koniec vzorcov ######
\r
14
puts "Obsahy:"
\r
15
print "\tStvorec:"
\r
16
print stvorec
\r
17
puts
\r
18
\r
19
print "\tKruh:"
\r
20
print kruh
\r
21
puts
\r
22
\r
23
puts "Objemy:"
\r
24
print "\tKocka:"
\r
25
print kocka
\r
26
puts
\r
27
\r
28
print "\tGula:"
\r
29
print gula
\r
30
puts
\r