#!/bin/bash


echo "Digite seu peso (kg):"
read peso

echo "Digite sua altura (m):"
read altura


imc=$(echo "scale=2; $peso / ($altura * $altura)" | bc)

echo "Seu IMC é: $imc"


if (( $(echo "$imc < 18.5" | bc -l) )); then
    echo "Abaixo do peso"
elif (( $(echo "$imc >= 18.5 && $imc <= 24.9" | bc -l) )); then
    echo "Peso normal"
elif (( $(echo "$imc >= 25 && $imc <= 29.9" | bc -l) )); then
    echo "Sobrepeso"
else
    echo "Obesidade"
fi

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: