Computer Science Canada cannonball game problem |
Author: | Sevensins [ Mon Feb 26, 2007 9:39 pm ] |
Post subject: | cannonball game problem |
ok for my grade 11 project I need to create a simple cannonball game where you enter the velocity and angle. My teacher gave me the formula but she went to a confrence for a week and the sub. cant help me so i need help. The formula goes somthing like this "x:= round(5*velocity*time*cosd(angle))" "y:=round(5*velocity*time*sind(angle)*0.5*time*time)" i know about the predefined words its just that it says "interger overflow in 'round' on y's line. can anyone figure it out |
Author: | Clayton [ Mon Feb 26, 2007 9:44 pm ] |
Post subject: | Re: cannonball game problem |
It would help to see all of the code, but it's my bet that that time^3 you have going on there isn't helping you much.... Can't really do too much until we can figure out what sort of values you are dealing with. |
Author: | berrberr [ Fri Mar 02, 2007 10:02 pm ] | ||
Post subject: | Re: cannonball game problem | ||
Well a few months ago I wanted to make the same thing as you, but gave up . Anyways, this is what I came up with. I know its not quite correct but maybe it will point you in the right direction...
|