Computer Science, asked by rahulrajuchu, 8 months ago

write an algorithm to print first N odd numbers​

Answers

Answered by XxJAHANGIRxX
2

Explanation:

Logic to print odd numbers from 1 to n using if statement

Input upper limit to print odd number from user. Store it in some variable say N .

Run a loop from 1 to N , increment loop counter by 1 in each iteration. ...

Inside the loop body check odd condition i.e. if a number is exactly divisible by 2 then it is odd.

Similar questions