Posted to tcl by kotrcka at Fri Dec 20 00:08:02 GMT 2019view raw
- set vypocet [gets stdin]
- if {[string match ?+? $vypocet] > 0} {
- puts "je tam plus"
- } elseif {[string match ?-? $vypocet] > 0} {
- puts "je tam minus"
- } elseif {[string match ?\*? $vypocet] > 0} {
- puts "je tam krat"
- } elseif {[string match ?/? $vypocet] > 0} {
- puts "je tam deleno"
- } else {
- puts "nie je ni "
- }