Pseudecode
Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm.
It uses the structural conventions of a programming language,
but is intended for human reading rather than machine reading.
Pseudocode typically omits details that are not essential for human
understanding of the algorithm, such as variable declarations, system-specific code and some subroutines. The programming language is augmented with natural language
description details, where convenient, or with compact mathematical
notation. The purpose of using pseudocode is that it is easier for
people to understand than conventional programming language code, and
that it is an efficient and environment-independent description of the
key principles of an algorithm. It is commonly used in textbooks and
scientific publications that are documenting various algorithms, and
also in planning of computer program development, for sketching out the
structure of the program before the actual coding takes place.
No standard for pseudocode syntax exists, as a program in pseudocode
is not an executable program. Pseudocode resembles, but should not be
confused with skeleton programs, including dummy code, which can be compiled without errors. Flowcharts and Unified Modeling Language (UML) charts can be thought of as a graphical alternative to pseudocode, but are more spacious on paper.
Task:
Create the pseudocode to accept item name , price , and quantity . You need to calculate value as the product of price and quantity. And display the calculated!
Answer:
begin
string name ;
byte quantity ;
float price, value ;
display "input name of product" ;
accept name ;
display "input quantity" ;
accept quantity ;
display "input price" ;
accept price ;
end