DEV Community

Cover image for Psuedocode
Zaynul Abedin Miah
Zaynul Abedin Miah

Posted on • Edited on

1

Psuedocode

A Pseudocode is defined as a step-by-step description of an algorithm. It's a human readable description of an algorithm. Algorithm is a sequence of steps we take to solve a particular code. The flowcharts we have drawn also represents algorithm. Pseudocode is the intermediate state between an idea and its implementation(code) in a high-level language.

Example:

*Calculating Prime numbers using Psuedocode *
Image description

  • First Read the value of N which can be any number.
  • Then choose a value for iterations for this you have to put the value of iterations i=2. It's because prime numbers are divisible by 1 and itself only.
  • we will use while loop for this problem, then iterate the value while it is i<N-1.
  • If the value is divisible by i it will enter into the curly brackets and will print not prime. If it isn't it will increment the i value while it is less than N-1 and will print prime if there aren't any value which is divisible between i and N-1.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay