Dear all,

I did this program using switch statement but it gives no result.

Please help to code.
Code:
#include <stdio.h>
#include <conio.h>
int main(void)
{
    int menu;
    float kilo,meters;
    int q,x;

    printf("enter in weight and height -->");
    scanf("%f %f", &kilo, &meters);
    q=kilo/(meters*meters);
    printf("Value of q is %d",q);

    switch (q)
        {
    case 1:
	if (q<20)
	printf("Underweight \n");
	break;
	case 2:
	if (q>=20 && q<25)
	printf("Healthy Weight \n");
	break;
	default: printf("Extremely Overweight \n");
	}

    getch();
}
thankx
Ubha

Last edited by shabbir; 18Dec2006 at 10:30.. Reason: Code formatting