1%2 ? what is the answer ???

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2007
Posts: 85
Reputation: Zay is an unknown quantity at this point 
Solved Threads: 0
Zay's Avatar
Zay Zay is offline Offline
Junior Poster in Training

1%2 ? what is the answer ???

 
0
  #1
Apr 29th, 2007
Hello;

can any 1 tell me what is the answer for the following statement :

1%10

and

1%2



Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: 1%2 ? what is the answer ???

 
0
  #2
Apr 29th, 2007
Can you spend 10 seconds writing a 1 line program to show you the answers?
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,824
Reputation: ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all 
Solved Threads: 117
ithelp's Avatar
ithelp ithelp is offline Offline
Posting Virtuoso

Re: 1%2 ? what is the answer ???

 
0
  #3
Apr 29th, 2007
the answer is 1 , you should have found it out yourself, x%y = x-(x/y)*y (integer division)
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2,031
Reputation: Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of 
Solved Threads: 177
Aia's Avatar
Aia Aia is offline Offline
Postaholic

Re: 1%2 ? what is the answer ???

 
0
  #4
Apr 29th, 2007
Originally Posted by Zay View Post
Hello;

can any 1 tell me what is the answer for the following statement :

1%10

and

1%2



Is you question what is it and how it works?. Look for the modulus operator.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC