Skip to content

Commit

Permalink
Solve Positive Numbers in clojure
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Sep 28, 2024
1 parent 6c840ee commit 0ee6bb7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions solutions/beecrowd/1060/1060.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(ns main)

(defn main []
(loop [count 0
line (read-line)]
(if (not line)
count
(recur
(if (> (Double/parseDouble line) 0)
(+ count 1)
count)
(read-line)))))

(println (format "%d valores positivos" (main)))

0 comments on commit 0ee6bb7

Please sign in to comment.