Computer Science, asked by akshitahizkial68, 5 months ago

write an algorithm to calculate square of a number (you can take any number you want) pls answer fast i will mark you brainliest​

Answers

Answered by anindyaadhikari13
6

Required Answer:-

Question:

  • Write an algorithm to calculate square of a number.

Solution:

Here is the algorithm.

  1. START
  2. Ask the user to enter a number.
  3. Multiply the number with itself and store the result in a variable, say s.
  4. Display the value of s.
  5. STOP

Sample program of this question in Python.

n=int(input("Enter a number: "))

s=n*n

print("Square: ", s)

Similar questions