[cs13001] Lab 5 problem

Mikhail Nesterenko mikhail at cs.kent.edu
Fri Feb 14 12:43:01 EST 2014


> Whenever I run the program, it always runs the bmr calculator for
> men. I tried to make the else statement into an else if statement,
> but whenever I run the program, it will end the program without
> running either of the statements for some reason. Could you please
> take a look at my code and tell me what's wrong? Thanks.

I suggest giving a strong, hard look at the expression in your
branching statement. Email me if you don't figure it out, I'll tell
you the answer.

Thanks,
--
Mikhail



        if (gender = m){
                bmr = bmrMen(weight, height, age);
		...
        }
        else {
                bmr = bmrWomen(weight, height, age);
		...
        }





More information about the cs13001 mailing list