| man156 (15) | |
|
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 | |
|
|
|
| Duoas (6734) | |
|
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! | |
|
|
|
| man156 (15) | |
|
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 = & >= & <= | |
|
|
|
| Faldrax (324) | |
| Try looking at http://www.cplusplus.com/doc/tutorial/control.html - this should have what you need. | |
|
|
|