+ 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.

7th Dec 2017, 12:23 PM
Usman Amin
Usman Amin - avatar
1 Answer
+ 8
oddNums = 1 count = 0 while oddNums < 100 print oddNums add 2 to oddNums add 1 to count print count
7th Dec 2017, 1:24 PM
qwerty
qwerty - avatar