You are using a version without Ads of this website. Please, consider donating:

### vetor e array

Hello again just fine here in the forum

And my knowledge and very basic in c + +

Need a little help ...

Gotta turn this code on.

homogeneous three vectors in a two-dimensional array ...

follows the code

# Include
# Include <stdlib.h>
# Include <string.h>
# Define T 20
main ()
{

float weight [t], then [t] imc [t] media_peso, media_altura;
int i;

for (i = 0, i <T, i + +)
{
printf ("\ n Weight:") scanf ("% f", & weight [i]);
printf ("\ n Height:") scanf ("% f", & time [i]);

imc [i] = weight [i] / (height [i] * time [i]);
}

system ("cis");

printf ("Height Weight BMI Situation \ n");
printf ("-------------------------------- \ n");

media_peso = 0;
media_altura = 0;

for (i = 0, i <T, i + +)
{
printf ("\ n% 3.2f% 3.2f% 3.2f", weight [i], height [i], BMI [i]);

if (imc [i] <= 18.5)
puts ("Underweight");
else if (imc [i] <= 25)
puts ("Normal Weight");
else if (imc [i] <30)
puts ("Overweight");
else
puts ("Obese");

media_peso + = weight [i];
media_altura + = time [i];

}

media_peso / = t;
media_altura / = t;

printf ("\ n \ nmedia Weight ==>% 3.2f", media_peso);
printf ("\ n \ nmedia Height ==>% 3.2f \ n \ n \ n", media_altura);
system ("pause");
}

I need to get the code to cim and puts two-dimensional array
Last edited on
"need help" is not a specific question. You should explain the problems you have in more detail.
I need to get the code to cim and puts two-dimensional array
Topic archived. No new replies allowed.