0
How do I use "if" for taking user inputs? (C++)
Help c++
4 Respostas
+ 1
Simba
I have 11 dollars
And I want to buy a house that cost 1000$
But if I put the input "house" it says I get in debt
But if I have more than 1000$, I buy it👍
+ 1
Yeah, that's how an if-else statement works.
You can take house as input variable and use it with relational operators(< or >) in if condition.
+ 1
Manav Roy thanks!