Computer Science, asked by nishikabtr, 1 year ago

write an algorithm for finding cube root of first positive hundred odd numbers and also make flowchart and pseudo code?

Answers

Answered by abhishek5269
1
)ALGORITHM
Step 1: Start
Step 2. Set A to 1
Step 3. While (A<50)
Step 3. print A
Step 4. A=A+2
Step 5. endwhile
Step 6. Stop

Let me first explain the algorithm. Since you need to print only the positive odd numbers from 1-50, you can set A to be 1 and loop under A reaches 50. You will not need additional variables. You'll have to print the value of A first and then increment it by 2 to print the next value 3, then 5 and so on till the loop reaches 50.

For the flowchart which I've attached, we START and then set the value of A=1 as mentioned. The looping condition is used in a diamond shaped box and we check if A<50. If yes, then we print A and increment it by 2 and repeat this till A is no more less than 50, in which case we STOP.

Here you go, Stalling! Let me know if you have any questions above the above solutions, or anything at all in the future. Tried to do this as quick as I could for you. If you felt our interaction was useful, please hit thumbs up :) take care!


nishikabtr: but how i Will pseudo code for it
abhishek5269: sry but i only know this
nishikabtr: it's ok
abhishek5269: ok
Similar questions