cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Multiple Requirenment for If statments
Multiple Requirenment for If statments
Jul 16, 2008 at 8:54pm UTC
metsfan95
(2)
I don't know how to have multiple requirements for if statments, like do this if a = 0 and b = 0. I googled it and searched this site but could not find any data. Please Help!!
Jul 16, 2008 at 9:02pm UTC
closed account (
z05DSL3A
)
1
2
3
4
if
((a==0) && (b==0)) {
//do whatever
}
Jul 16, 2008 at 9:05pm UTC
metsfan95
(2)
Thanks Alot!!! It works good and that was really quick. :)
Jul 16, 2008 at 11:41pm UTC
mikeb570
(188)
You also have
1
2
3
4
if
(a==0 || b == 0) { DoStuff(); }
which is logical OR. Will return true if either of the statements are true.
Topic archived. No new replies allowed.