if problem

how i can use if statment for more than 2 choice knowing that it is float not integer type
& also how to use switch for float type
& how to write that x equal & more than y in if statment
You will have to use the if..else if.. pattern.

You cannot switch on a floating point type --only on integer types.

Use: x >= y

Good luck!
explan more about if..else if.. pattern.
i know that
if (x > y )
{
cout << "good baye 1"<<endl;
}
else (x < y)
{ break;}
that for 2 cases & want for = & >= & <=
Try looking at http://www.cplusplus.com/doc/tutorial/control.html - this should have what you need.
Topic archived. No new replies allowed.