-
Some Help for Finals
hello im new here and have scouted the internet and i like this page alot.. so i signed up and will probably read more so than post but i did have some questions, really basic stuff for a final tommrow any help would be great thanks soo much!!
-------------------------------------------------------------------------------
ok,
in order of operations what comes first || or &&?
also in order of operations what is first == or !=?
finnally some loop stuff, i understand the code pretty decently i just dont know how many times the loop will be executed
eg:
int a = 10;
int x = 4; ...oops
do
{
cout << a << " --- " << x;
cout << endl << "wow";
}
while (a<=x)
----------------------------------------------------------------------
... im guessing as long as "a" is less that or equal to "x"
but what about like
----------------------------------------------------------------------
int a = 20;
int x = 4;
while (x<=a)
{
cout << a << "---" << x;
cout << endl << 'wow";
a--;
x++;
}
------------------------------------------------------------------------
i get lost here with the -- ++ stuff.. retarted i know..
again any help is much appritiated and if no help well i just will go and stare at my book for along time sniff
Last edited by JSUencode; 12-09-2002 at 05:01 PM.
-
Registered User
&& comes before ||, == and != are the same, there's no telling because you don't know what x is, and 9.
-
Banned
When in doubt use parenthesis. You should try and use parenthesis anyway since it makes you code more readable.
-
Popular pages
Recent additions