Posted to tcl by kotrcka at Fri Dec 20 00:08:02 GMT 2019view raw

  1. set vypocet [gets stdin]
  2.  
  3. if {[string match ?+? $vypocet] > 0} {
  4. puts "je tam plus"
  5. } elseif {[string match ?-? $vypocet] > 0} {
  6. puts "je tam minus"
  7. } elseif {[string match ?\*? $vypocet] > 0} {
  8. puts "je tam krat"
  9. } elseif {[string match ?/? $vypocet] > 0} {
  10. puts "je tam deleno"
  11. } else {
  12. puts "nie je ni "
  13. }