2024-03-11 10:34:40 +01:00
|
|
|
# Lösung: Erste Schritte
|
2024-03-11 10:32:49 +01:00
|
|
|
|
2024-03-11 10:39:04 +01:00
|
|
|
|
2024-03-11 10:41:23 +01:00
|
|
|
```clojure
|
|
|
|
#!/usr/bin/env -S clojure -M
|
2024-03-11 10:39:04 +01:00
|
|
|
|
|
|
|
(println "Produktname: ")
|
|
|
|
(def produkt (read-line))
|
|
|
|
|
|
|
|
(println "Einkauspreis:")
|
|
|
|
(def preis-einkauf (Integer/parseInt (read-line)))
|
|
|
|
|
|
|
|
(def preis-verkauf (max (* 2.5 preis-einkauf) 995))
|
|
|
|
|
|
|
|
(println "")
|
|
|
|
(print "Sonderangebot: ")
|
|
|
|
(println produkt "für nur" preis-verkauf "EUR")
|
|
|
|
|
|
|
|
```
|