Computer Science, asked by 00UnknownBrain00, 1 year ago

write an algorithm to display a number from 1 to 10​

Answers

Answered by kumarirekhagrd53
24

Answer:

Step 1: Start

Step 2: Initialize variable number as integer

number (n) = 1

Step 3: Read and print the value of number

Step 4: Repeat the step 3 until number < 10

4.1: number = number (n) + 1

Step 5: Stop

Answered by SaurabhJacob
2

The algorithm for the given problem is,

  1. START
  2. Include the Random module.
  3. Read a variable 'random'
  4. Store the random number from 1 to 10 by using the random module in the variable 'random'.
  5. Print the value in 'random'.
  6. End

In the above algorithm,

  • The Random module is included to use its methods for generating a number from a given range.
  • After that, the generated random number is stored in the variable 'random'.
  • Finally, the number is printed as the desired result.
Similar questions