ALGORITHM TO FIND AREA OF A SQUARE
Answers
Answered by
0
Answer:
an algorithm is a well defined procedure or formula to solving the problem related to sequence of specified action
so write the process step by step
Answered by
1
There are two ways you can do this:
Have a function that takes one parameter (the length of a side of a square—call it s ), and returns s∗s .
Recognize that a square is just a special case of a rectangle and have two functions:
A rectangle function that takes two arguments (call them width and height ) and returns width∗height
A square function that takes a parameter s , and calls your rectangle function with s as both width and heigh.
Please Mark me as a Brainliest Answerer ☺️☺️
Similar questions
Math,
4 months ago
Psychology,
4 months ago
Science,
4 months ago
English,
8 months ago
Math,
11 months ago