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.
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
Pseudocode.
X**y
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.
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.
Any of these: PRINT semicolon EMIT ; WRITE ";" etc.
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.
Pseudocode.
Give a business example of how loops can be beneficial in a program?
T. E. Bailey has written: 'Program design with pseudocode' -- subject(s): Programming, Electronic digital computers, Electronic digitalcomputer, Pseudocode (Computer program language)
X**y
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.
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.
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.
palawan
firstly try yourself then ask others or browse internet websites etc
Any of these: PRINT semicolon EMIT ; WRITE ";" etc.
A C program #include <stdio.h> int main() { printf("Hello, world!"); }