Write a program to generate an odd number series from 100 to 130.
Answers
Answered by
1
Answer:
Logic to print odd numbers from 1 to n without 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 it by 2 for each iteration. The loop structure should look like for(i=1; i<=N; i+=2) .
- Inside the loop body print the value of i .
Similar questions