answersLogoWhite

0

Pseudocode is a non-specific programming language that is used to outline an algorithm's logic using plain-English terms and sentence structures, but often incorporating the grammar of well-known programming constructs such as loops and branches.

For example, the following pseudocode demonstrates a loop that prints the values from 1 to 10:

let number be 0

repeat while number is less than 10

increment number

print number

This is a simple example, however anyone familiar with at least one programming language can translate this pseudocode into their chosen language without too many problems. The point of pseudocode is to reduce complex algorithms to their simplest form, without being overly-specific with regards an actual programming language. That is, the focus is purely upon the algorithm itself, rather than the idiosyncrasies of specific coding methods.

Pseudocode is not a programming language, per se, so there are no grammar rules regarding syntax or sentence structure. However, each line of code should be short and to the point (not overly-wordy), clearly conveying the point of the code. Whitespace and indentation should be used wherever necessary to convey the separation of code blocks (as shown in the example), or to break down complex lines into bite-size chunks that clearly show the logic.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
JudyJudy
Simplicity is my specialty.
Chat with Judy
More answers

psuedocode is a way of organizing a program before you write it. There isn't really a set standard for it. Instead of writing a program in C write it in english.


if (the choice is equal to five)
{
printf("output reponse to user");
}

Doing this helps you to understand what your code will do and where before you actually write the program

User Avatar

Wiki User

15y ago
User Avatar

declare integer a = 5

declare integer b = 2

declare integer c = 3

declare integer result

set result = a + b * c

display result

User Avatar

Wiki User

13y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Give an example of pseudocode program?
Write your answer...
Submit
Still have questions?
magnify glass
imp