Need help for this statement?
How would I write a statement related to a game where if your shot (lets say you are playing football) lands anywhere between five meet of the actual goal area, they win so how would I write this?
For example if the shot is at 1000 ft and the goal is at 1005 they win but how would I do this?
If I already have if statements that indicate if they wont to far or too short
cout<< "too far"
cout<< "Not enough"
thanks in advance
If goal is at distance = 50 meters, the winning area would be between 45 meters and 55 meters.
if((shot > (goal + 5)) || (shot < (goal - 5))) //If the shot distance is not within goal +- 5
Topic archived. No new replies allowed.