how to write an algorithm to print the first 10 odd numbers
Answers
Answered by
2
Answer:
Basically the concept is;
Given is first 10 odd numbers.
Initialize a integer type variable with value equal to 1. say , int i=1;
Start a loop for the variable and run it twice the value of 10 = 20.
Print the value initialised in step 2+ 2. e.g; i+2;
Update the value of i as i+=2.
Answered by
3
Answer:
Basically the concept is;
Given is first 10 odd numbers.
Initialize a integer type variable with value equal to 1. say , int i=1;
Start a loop for the variable and run it twice the value of 10 = 20.
Print the value initialised in step 2+ 2. e.g; i+2;
Update the value of i as i+=2
Similar questions