how to display and calculate odd number



hello everybody.... i juz wanna ask something.. anyone can show me the
algorithm of how to display list odd number that given by user..


for example..if i put 12... the the odd number would be 1,3,5,7,9,11
and total up of that odd number would be 36..
.