Even Digits : 0,2,4,6,8
Odd Digits : 1,3,5,7,9
Chances of choosing first odd digit = 5C1
Chances of choosing last odd digit = 4C1 (no repetitions)
Remaining middle 3 digits can be taken from 8 digits = 8C1*7C1*6C1
So totally 5C1*4C1*8C1*7C1*6C1 = 6720
Odd Digits : 1,3,5,7,9
Chances of choosing first odd digit = 5C1
Chances of choosing last odd digit = 4C1 (no repetitions)
Remaining middle 3 digits can be taken from 8 digits = 8C1*7C1*6C1
So totally 5C1*4C1*8C1*7C1*6C1 = 6720