View Single Post
  #8  
Old January 6th, 2009, 04:39 AM
HallsofIvy HallsofIvy is offline
MHF Contributor

 
Join Date: Apr 2005
Posts: 5,373
Thanks: 787
Thanked 1,908 Times in 1,761 Posts
HallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant futureHallsofIvy has a brilliant future
Default

Quite frankly, the simplest way to write a program to find integers X and Y such that Offset = Y * 160 + X * 2 for a given "offset" is first to write X= (Offset- 160Y)/2 and then step through integer values for Y until you find one that gives X integer also.
Reply With Quote