0% found this document useful (0 votes)
184 views2 pages

Nota Pseudocode (15feb)

Pseudocode is a description of an algorithm or computer program expressed in plain English rather than a formal programming language. It allows programmers to plan programs without worrying about syntax. The example pseudocode shows the logic for computing a discount on an item's price. Pseudocode resembles the flow of a program and can be written at varying levels of detail, from broad overviews to more specific instructions. It is similar to a flowchart but uses text rather than graphical symbols.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views2 pages

Nota Pseudocode (15feb)

Pseudocode is a description of an algorithm or computer program expressed in plain English rather than a formal programming language. It allows programmers to plan programs without worrying about syntax. The example pseudocode shows the logic for computing a discount on an item's price. Pseudocode resembles the flow of a program and can be written at varying levels of detail, from broad overviews to more specific instructions. It is similar to a flowchart but uses text rather than graphical symbols.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ALGORITM REPRESENTATIVE

PSEUDOCODE

DEFINITION:

Pseudocode is the text only describes the logic and the program flow of a computer program. Pseudocode
resembles plain English only. It is usually does not have a specific programming language syntax and
grammar.

Pseudocode (pronounced SOO-doh-kohd) is a detailed yet readable description of what a computer


program or algorithm must do, expressed in a formally-styled natural language rather than in a
programming language. Pseudocode is sometimes used as a detailed step in the process of developing a
program. 

Example of Pseudocode:
if credit card number is valid
execute transaction based on number and order
else
show a generic failure message
end if

Standard of good pseudocode

Instruction: Computing Discount

Pseudocode (VB)
Computing the final price an item after figuring the discount
Notes for 3 types of instruction:
BEGIN
1. Request price of item Input (Request)
2. Request discount rate Process/calculate (=)
3. Discount=price of item times discount rate Output (Print)
4. Final price=price of item subtract discount
5. Print final price
END

(Sources: http://smkts.net/czul/s_computing.html)

For example of pseudocode ( turbo c)

if total is greater than 70


print pass
else
print fail

So, once you study this code-You have to give an input to the total variable and the output should be a print
statement.The print statement depends on the decision statement IF which is done through comparison

1
ALGORITM REPRESENTATIVE

Program:
main()
{
int total; Functional program:
printf("Enter the value of total: ");
scanf("%d",&total); Input function(scanf)
if(total>70) Output (Printf)
{ Input fuction used at the end of the
printf("Pass"); program (getch)
}
else
{
printf("Fail");
}
getch();
}

Difference and similarity between Pseudocode and Flowchart

- Difference
Pseudocode is a sentence-like representation of a piece of code WHILE
A flowchart is a symbolic representation of code, using box shapes and arrows

- Similarity
Flowcharts and pseudocode are both ways to show the steps taken by an algorithm to solve a problem

You might also like