I have a teacher, he does not know what he's doing.
so I have a question for you.
when you use switch statements.
sometimes you need to write like this code before you start write the cases.
I haven't used it, I try to avoid it in my programs.
can I ask you guys, is there any website or a thread on this forum tell me how I can use ( % ) or ( /=) , etc.
switch ( x /= 200)
switch ( x % 200)
x /= 200 will change x to x / 200, and then switch on that value.
x % 200 calculates the remainder of x divided by 200.
Is there any condition I have to know?
Condition for what?
Originally Posted by saudi-vip
I mean ( /= and % )
i know these two is there any
I have problem with names too. :)
this is the first semester for me studying C.
so, I don't know what you called them.
Maybe you should also find a better teacher if he can't even answer a simple question like that.
I don't trust him,
so I would like to ask you guys before doing something stupid , :)
switch ( x /= 200) != switch(x / 200)
I think the left-most one will get your code doing crazy crap that you didn't want. Though I can't pretend like I know that for sure.
C programming drives me crazy with its crazy crap. :(