H! Everyone
Here is one small question.
What do you people write if you have to execute a code if say, a number is from 6 to 10? Anything else does not execute that action, and may be used to do something else, like exit. I also hope the syntax you would show would be common knowledge, meaning all programmers big and small would know.
I happen to ask this because nowhere on the net is there an example of this. Not even on the site I am studying the C++ tutorial from (CPlusPlus.com) .
After I receive a few replies, I would have something more to add.
Thanks
Here is one small question.
What do you people write if you have to execute a code if say, a number is from 6 to 10? Anything else does not execute that action, and may be used to do something else, like exit. I also hope the syntax you would show would be common knowledge, meaning all programmers big and small would know.
Code:
int a; cin >>a; [if the number is from 6 to 10, then:] cout <<"6 to 10"; [otherwise exit]
After I receive a few replies, I would have something more to add.
Thanks
Comment