added orai

This commit is contained in:
szabomarton committed 2025-03-25 11:06:02 +01:00
1 parent 299bb6288c
commit 0ae64aeb4b
3 files changed
+71

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
declare -f magassag
declare -i tomeg
read -p "Add meg a magasságod (cm): " magassag
magassag=$(echo "sclae=2; $magassag / 100" | bc -l)
read -p "Add meg a testtömeged (kg): " tomeg
declare -f BMI
BMI=$(echo "scale=2; $tomeg / ($magassag * $magassag)" | bc -l)
echo $BMI
if (( $(echo "$BMI < 18.5" | bc -l) )); then
echo "Sovány"
elif (( $(echo "$BMI < 24.9" | bc -l) )); then
echo "Normál"
else
echo "Túlsúly"
fi
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
read -p "Gyümölcs: " fruit
if [ "$fruit" = "alma" ]; then
echo "Ez alma"
elif [ "$fruit" = "korte"]; then
echo "Ez körte"
else
echo "Nem alma és nem körte"
fi