answersLogoWhite

0


Best Answer

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
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

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

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

declare integer a = 5

declare integer b = 2

declare integer c = 3

declare integer result

set result = a + b * c

display result

This answer is:
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
Related questions

Develop an algorithm to display all prime numbers from 2 to 100 Give both the pseudocode version and the flowchart version Convert your pseudocode into a Java program?

Develop an algorithm to display all prime numbers from 2 to 100. Give both the pseudocode version and the flowchart version. Convert your pseudocode into a Java program.


What is an English-like statement used to describe the logic of a program?

Pseudocode.


Give a business example of how loops can be beneficial in a program?

Give a business example of how loops can be beneficial in a program?


What has the author T E Bailey written?

T. E. Bailey has written: 'Program design with pseudocode' -- subject(s): Programming, Electronic digital computers, Electronic digitalcomputer, Pseudocode (Computer program language)


How do you write a pseudocode program for finding out x to the power of y?

X**y


Pseudocode could be logically incorrect if not properly indented?

The indentation doesn't affect the "logic" of the program, however it would make it make harder to read and the purpose of pseudocode is to be read.


Is pseudocode a combination of programming language and machine code?

No. Pseudocode is not used to write complete programs; rather, it is an overview of what you want to achieve. For example, the following pseudocode is for a program to print a list of square roots: for i = 1 to 10 show i, i*i A specific programming language may not have a "show" command, and the structure of the "for" loop might be different; additional setup and cleanup commands may also be required in a real computer program; the purpose of this pseudoce is merely to explain, to a human, what you want to achieve. The real code, with more detail, will have to be added later.


Could Pseudocode could be logically incorrect if not properly indented.?

The indentation doesn't affect the "logic" of the program, however it would make it make harder to read and the purpose of pseudocode is to be read.


Give an example of an email program?

palawan


Display a pseudocode for a calculator program?

firstly try yourself then ask others or browse internet websites etc


How do you write the semicolon symbol in a pseudocode logic program delaing with classes?

Any of these: PRINT semicolon EMIT ; WRITE ";" etc.


Give an example of computer program?

A C program #include <stdio.h> int main() { printf("Hello, world!"); }