Jump to content

Calculadora de IMC.


Rodrigo Ghammachi

Recommended Posts

Cara, você tem que primeiro obter a entrada do usuário e depois fazer o cálculo. Tu tá calculando o valor da variável `imc` antes, impossível obter o resultado correto.

Mova a atribuição da variável imc para ficar após a leitura das variáveis peso e altura. Exemplo:

imc = peso/(altura*altura);
cout << "O seu IMC eh: " << imc << endl;
return 0;

 

  • Curtir 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...