How to combine tow condition with if

Rabi

Member
Joined
Mar 22, 2022
Messages
17
Programming Experience
Beginner
I tried this but does not work.
if ( age > 32 && tall >> 170) { Console..."Yes" }
How to combine these tow condition :
age and tall?
 
Solution
Try it out in an IDE and find out. We don't live in the 1950's and 1960's where you had to punch cards, submit the cards for a job run, and come back the next day to get a print out the next day to see if your program ran correctly or not.

Just scanning that code though, it looks like If is not a C# keyword, and the compiler will likely have a fit with Consol....this is true.
Try > instead of >>
 
Is this code possible :

If ( (age > 10 && tall > 170) || ( wight > 60)) { Consol....this is true }
 
Try it out in an IDE and find out. We don't live in the 1950's and 1960's where you had to punch cards, submit the cards for a job run, and come back the next day to get a print out the next day to see if your program ran correctly or not.

Just scanning that code though, it looks like If is not a C# keyword, and the compiler will likely have a fit with Consol....this is true.
 
Solution
Back
Top Bottom