1.

Write down Algorithm & flowchart for following.1)Calculate the square of any number.​

Answer»

lgorithm is a step - by - step SOLUTION of a PROGRAM. It HELPS us to BREAK the complex solution of a program into smaller units.

Algorithm of the program :-

Step 1 - Start.

Step 2 - Accept a number from the user in the variable N.

Step 3 - Multiply n with n (i.e. n*n) and store its value in variable p.

Step 4 - Print p with a statement "The square of the number is -".

Step 5 - End.

Flowchart of the program - in the attachment.



Discussion

No Comment Found