+ 3
Help in C++! (or help in an Algorithm of any language).
Please help me in the following problem! How can I find that how many numbers present in the body of a loop, I.e in a loop where odd numbers (odd numbers<100) are printed out but now I want to know the Number of odd number present in the output.
1 Answer
+ 8
oddNums = 1
count = 0
while oddNums < 100
print oddNums
add 2 to oddNums
add 1 to count
print count