i want know the 5 distinct odd numbers from 1 to 20 the sum of these 5 numbers must be Equal to 50 Is it possible

No it is not possible.

odd+odd = even

odd+even = odd

therefore:

odd*odd = odd

odd*even = even

You are trying to find numbers which satisfy

odd * 5 = 50

However since 5 is odd, this means you are doing odd*odd, which means the result will be odd... and 50 is even.

Long story short... the sum of any 5 odd numbers is going to be odd. There is no solution to this problem.

EDIT: though I'm not entirely sure what this has to do with C++.....

odd+odd = even

odd+even = odd

therefore:

odd*odd = odd

odd*even = even

You are trying to find numbers which satisfy

odd * 5 = 50

However since 5 is odd, this means you are doing odd*odd, which means the result will be odd... and 50 is even.

Long story short... the sum of any 5 odd numbers is going to be odd. There is no solution to this problem.

EDIT: though I'm not entirely sure what this has to do with C++.....

Last edited on

Topic archived. No new replies allowed.