Calculadora de IMC em Perl
Publicado por victor (última atualização em 06/12/2018)
[ Hits: 2.087 ]
Homepage: kkk
Programa básico, reescrito em Perl, que calcula seu IMC e te informa se você está abaixo, acima ou em seu peso ideal.
print" CALCULADORA DO IMC V2 \n"; print" PRIMEIRAMENTE VAMOS CALCULAR SEU IMC: \n": print" DIGITE SEU PESO EM KG \n"; chomp($peso = <STDIN>); print" DIGITE SUA ALTURA EM METROS \n"; chomp($altura = <STDIN>); print" O RESULTADO DE SEU IMC É" .$peso/$altura*$altura; print" AGORA QUE JÁ SABEMOS O RESULTADO DE SEU IMC, VAMOS VER SE SEU PESO ESTÁ CORRETO: \n"; print" DIGITE SEU IMC: \n"; chomp($imc = <STDIN>); if($imc < 17 and $imc = 18) { print" VOCÊ ESTÁ ABAIXO DO PESO, GANHE MASSA \n"; } if($imc > 40) { print"VOCê ESTÁ MUITO ACIMA DO PESO, PERCA MASSA \n"; } if($imc >= 19 and $imc <= 25) { print" PARABÉNS, VOCÊ ESTÁ EM SEU PESO IDEAL \n"; } if ($imc > 25 and $imc <= 29) { print" CUIDADO, VOCÊ ESTÁ ACIMA DO PESO \n": } if ($imc > 29 and $imc <= 34) { print" VOCÊ ESTÁ OBESO, PERCA MASSA \n"; } if ($imc > 34 and $imc <= 39) { print" VOCÊ ESTÁ MUITO ACIMA DO PESO, PERCA MASSA \n"; } print" SATISFEITO COM SEUS RESULTADOS?? \n": print" NOSSO SISTEMA TEM 98% DE PRECISÃO \n";
Usando comandos shell com Perl
Cálculo de área de uma figura geométrica
Nenhum comentário foi encontrado.
Como gerar qualquer emoji ou símbolo unicode a partir do seu teclado
Instalar e Configurar o Slackware Linux em 2025
Como configurar os repositórios do apt no Debian 12 em 2025
Passkeys: A Evolução da Autenticação Digital
Instalação de distro Linux em computadores, netbooks, etc, em rede com o Clonezilla
Configurando o Conky para iniciar corretamente no sistema
3 configurações básicas que podem melhorar muito a sua edição pelo editor nano
Como colorir os logs do terminal com ccze
Instalação Microsoft Edge no Linux Mint 22
Como configurar posicionamento e movimento de janelas no Lubuntu (Openbox) com atalhos de teclado
firefox nao guarda meus logins nos sites (1)
Instalar debian testing (13) "por cima" do debian 12 (2)
Erro de segmentação «Segmentation fault (core dumped)» ao retornar obj... (1)