By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,097 Members | 1,405 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,097 IT Pros & Developers. It's quick & easy.


P: 2
1.what is the resultof the expression 5+20%3?
Mar 22 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 807
1.what is the resultof the expression 5+20%3?
No one does C++ in the Visual Basic forum: we're not allowed!

What operation gets done first?
That's right -- the mod, so 20 mod 3 is the remainder after dividing 20 by three. In other words, two!

So, now we are left with 5+2=
Hint, it's definitely not 1,
that would be (5+20)%3
Mar 22 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.