Pseudo Code

Description of Pseudo Code

Pseudo Code

Pseudocode is an informal way of programming description that does not require any strict programming language syntax. It is used for creating an outline or a rough draft of a program. The pseudo code will be helpful for creating large modules of Programs.

An algorithm is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed. An algorithm is merely the sequence of steps taken to solve a problem. The steps are normally “sequence,” “selection, " “iteration,” and a case-type statement.

Code

Flow Chart

As the above image explains the logic and flow of adding 5 numbers.

  • Start is used to begin program execution
  • Declare sum and count as 0
  • Get the number to be added in the sum.
  • Add the number to the sum and increment the count by 1.
  • Checking the count is less than 5:
    • if the count is less than 5 continue to ask the number
    • if the count is more than 5 break the loop and proceed to print the sum.
  • Print the sum value
  • Terminate the program.

Task

Write a pseudo code and a flow chart for finding the given number is an armstrong number or not.

Note: Pseudo code must be written by your own.

Create a folder with name "Task-6" in the Cognizance repository and upload the pseudo code 
and flow chart.