Question
Pkease who can help? I need to know a pseudocode to display the first n positive integers given n from the user.
here is what i tried
PROMPT “Please enter n”
GET n
IF n==1 then
DISPLAY “1”
WHILE n>1
COMPUTE intiger=n-(n-1)
DISPLAY integer
ENDWHILE
here is what i tried
PROMPT “Please enter n”
GET n
IF n==1 then
DISPLAY “1”
WHILE n>1
COMPUTE intiger=n-(n-1)
DISPLAY integer
ENDWHILE
Answers
why not
PROMPT “Please enter n”
GET n
m=0
WHILE m < n
COMPUTE m = m+1
DISPLAY m
ENDWHILE
PROMPT “Please enter n”
GET n
m=0
WHILE m < n
COMPUTE m = m+1
DISPLAY m
ENDWHILE
Thanks Steve, I found it great!
Related Questions
how do I write a pseudocode to find and display the largest list of positive numbers entered by the...
Mr Ali has given a test to his class. He would like to have the average score for the class as well...
write a pseudocode to list any 25 integer and display both negative and positive
Add the 3 numbers and display the sum by using pseudocode