theEclipse
Programmer
Hi all,
I am needing to make a do-while loop in a command-line program. my problem is that I cannot seem to find in my book, or the e-book version (slightly different) how to write "and" and "or" statements. I tried using && (like javascript) and ||, but they dont seem to work
here is the code snippet:
while ((iuserChoice< 1) || (iuserChoice <2));
I need it to say: while iuserChoice is less than 1 or greater than 2.
I am using Microsoft Visual C++
Thanks for any help! Robert Carpenter
questions? comments? thanks? email me!
eclipse_web@hotmail.com
Icq: 124408594
AIM & MSN: robacarp
I am needing to make a do-while loop in a command-line program. my problem is that I cannot seem to find in my book, or the e-book version (slightly different) how to write "and" and "or" statements. I tried using && (like javascript) and ||, but they dont seem to work
here is the code snippet:
while ((iuserChoice< 1) || (iuserChoice <2));
I need it to say: while iuserChoice is less than 1 or greater than 2.
I am using Microsoft Visual C++
Thanks for any help! Robert Carpenter
questions? comments? thanks? email me!
eclipse_web@hotmail.com
Icq: 124408594
AIM & MSN: robacarp