Hello :D

Can anybody help me to write a program to print series of odd numbers starting from (m) and as long as the printed numbers are smaller than or equal to the given number (n) ?
1
2
3
4
5
6
void printOddInRange(int m, int n) {
	for i from m to n { // for numbers i starting at m and ending at n
		if isOdd(i) //check if i is odd
			print i
	}
}


That's essentially what you have to do. I leave the actual coding part to you.
Topic archived. No new replies allowed.