SlideShare a Scribd company logo
4
Most read
7
Most read
8
Most read
C
PSEUDOCODE & FLOWCHART
EXAMPLES
10 EXAMPLES
www.csharp-console-examples.com
Pseudocode
• Pseudocode is a compact and informal high-level
description of a program using the conventions of a
programming language, but intended more for
humans.
• There is no pseudocode standard syntax and so at
times it becomes slightly confusing when writing
Pseudocode and so let us understand pseudo code
with an example.
Pseudecode Syntax
• FOR THOSE TUTORIALS I'LL USE THAT SYNTAX
• INPUT – indicates a user will be inputting something
• OUTPUT – indicates that an output will appear on the screen
• WHILE – a loop (iteration that has a condition at the beginning)
• FOR – a counting loop (iteration)
• REPEAT – UNTIL – a loop (iteration) that has a condition at the end
• IF – THEN – ELSE – a decision (selection) in which a choice is made
• any instructions that occur inside a selection or iteration are usually indented
Pseudocode & Flowchart Example 1
Add Two Numbers
1
2
3
4
5
6
7
8
9
BEGIN
NUMBER s1, s2, sum
OUTPUT("Input number1:")
INPUT s1
OUTPUT("Input number2:")
INPUT s2
sum=s1+s2
OUTPUT sum
END
Pseudocode & Flowchart Example 2
Calculate Perimeter of Rectangle
1
2
3
4
5
6
7
8
9
BEGIN
NUMBER b1,b2,area,perimeter
INPUT b1
UNPUT b2
area=b1*b2
perimeter=2*(b1+b2)
OUTPUT alan
OUTPUT perimeter
END
Pseudocode & Flowchart Example 3
Find Perimeter Of Circle using Radius
2
3
4
5
6
BEGIN
NUMBER r, perimeter
INPUT r
area=3.14*2*r
OUTPUT perimeter
END
Pseudocode & Flowchart Example 4
Calculate sales taxes
3
4
5
6
7
8
9
10
11
12
13
14
15
BEGIN
NUMBER price, tax, taxRate, total
OUTPUT "Enter Product Price"
INPUT price
OUTPUT "Enter tax rate amoung 1 and 100"
OKU taxRate
tax= price* taxRate/100
total= price + tax
OUTPUT "Product tax="+tax
OUTPUT "Product total price ="+total
END
Pseudocode & Flowchart Example 5
Check a Number is Positive or Negative
5
6
7
8
9
10
11
12
13
14
15
16
BEGIN
NUMBER num
OUTPUT "Enter a Number"
OKU num
IF num>0 THEN
OUTPUT "Entered number is positive"
ELSE IF num <0 THEN
OUTPUT "Entered number is negative"
ELSE
OUTPUT "Entered number is zero"
ENDIF
END
Pseudocode & Flowchart Example 6
Find the biggest of three (3) Numbers
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
BEGIN
NUMBER num1,num2,num3
INPUT num1
INPUT num2
INPUT num3
IF num1>num2 AND num1>num3 THEN
OUTPUT num1+ "is higher"
ELSE IF num2 > num3 THEN
OUTPUT num2 + "is higher"
ELSE
OUTPUT num3+ "is higher"
ENDIF
END
Pseudocode & Flowchart Example 7
Print Numbers from 1 to 100
2
3
4
5
6
7
8
BEGIN
NUMBER counter
FOR counter = 1 TO 100 STEP 1 DO
OUTPUUT counter
ENDFOR
END
Pseudocode & Flowchart Example 8
Read 50 numbers and find their sum
BEGIN
NUMBER counter, sum=0, num
FOR counter=1 TO 50 STEP counter DO
OUTPUT "Enter a Number"
INPUT num
sum=sum+num
ENDFOR
OUTPUT sum
END
Pseudocode & Flowchart Example 9
Read 10 numbers and find sum of even numbers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BEGIN
NUMBER counter, sum=0, num
FOR counter=1 TO 10 STEP 1 DO
OUTPUT "Enter a Number"
INPUT num
IF num % 2 == 0 THEN
sum=sum+num
ENDIF
ENDFOR
OUTPUT sum
BİTİR
Pseudocode & Flowchart Example 10
Calculate the Square Root of a Number
BEGIN
NUMBER root=1, counter=0,num
OUTPUT "Enter a number for calculate the root"
INPUT num
WHILE sayac < sayi+1 THEN
i=i+1
root=(num/root+root)/2
END WHILE
OUTPUT root
END
csharp-console-examples.com
For more pseudocode ve flowchart
examples
click here

More Related Content

What's hot (20)

PDF
SPL 2 | Algorithms, Pseudo-code, and Flowchart
Mohammad Imam Hossain
 
PPTX
Introduction to Pseudocode
Damian T. Gordon
 
PPTX
Programming Fundamentals
Trivuz ত্রিভুজ
 
PPTX
Pseudocode flowcharts
nicky_walters
 
PPTX
Algorithm and pseudo codes
hermiraguilar
 
PPTX
Introduction to flowchart
Jordan Delacruz
 
PPTX
Presentation on Operating System & its Components
Mahmuda Rahman
 
PPTX
Control statements in c
Sathish Narayanan
 
PPT
Lect 1. introduction to programming languages
Varun Garg
 
PPT
3 algorithm-and-flowchart
Rohit Shrivastava
 
PPTX
Algorithms and flowcharts
Samuel Igbanogu
 
PPTX
ppt of flowchart
140120109032
 
PPTX
Algorithm and flowchart
Elizabeth de Leon Aler
 
PPTX
Algorithm and psuedocode
Mustafa Qureshi
 
PPTX
The Loops
Krishma Parekh
 
PPTX
History of Programming Language
tahria123
 
PPTX
Pseudocode
Harsha Madushanka
 
PPTX
Java History
Prionto Abdullah
 
PPTX
Programming Paradigm & Languages
Gaditek
 
PPTX
Data structure and algorithm using java
Narayan Sau
 
SPL 2 | Algorithms, Pseudo-code, and Flowchart
Mohammad Imam Hossain
 
Introduction to Pseudocode
Damian T. Gordon
 
Programming Fundamentals
Trivuz ত্রিভুজ
 
Pseudocode flowcharts
nicky_walters
 
Algorithm and pseudo codes
hermiraguilar
 
Introduction to flowchart
Jordan Delacruz
 
Presentation on Operating System & its Components
Mahmuda Rahman
 
Control statements in c
Sathish Narayanan
 
Lect 1. introduction to programming languages
Varun Garg
 
3 algorithm-and-flowchart
Rohit Shrivastava
 
Algorithms and flowcharts
Samuel Igbanogu
 
ppt of flowchart
140120109032
 
Algorithm and flowchart
Elizabeth de Leon Aler
 
Algorithm and psuedocode
Mustafa Qureshi
 
The Loops
Krishma Parekh
 
History of Programming Language
tahria123
 
Pseudocode
Harsha Madushanka
 
Java History
Prionto Abdullah
 
Programming Paradigm & Languages
Gaditek
 
Data structure and algorithm using java
Narayan Sau
 

Similar to Pseudocode & flowchart examples (20)

DOCX
8234.docx
singsang3
 
PDF
ICP - Lecture 6
Hassaan Rahman
 
PPTX
2. Algorithms Representations (C++).pptx
ssuser4d77b2
 
PPSX
Ds02 flow chart and pseudo code
jyoti_lakhani
 
PPT
Fundamentals of Programming Chapter 3
Mohd Harris Ahmad Jaal
 
PDF
Introduction to programming : flowchart, algorithm
Kritika Chauhan
 
PPTX
pseudocode Note(IGCSE Computer Sciences)
MKKhaing
 
PDF
Cse115 lecture03problemsolving
Md. Ashikur Rahman
 
PDF
L- 14. 0 Algorithm_Flowchart_Example.pdf
TonmoyIslam16
 
PPT
Proble, Solving & Automation
Janani Satheshkumar
 
PPT
UNIT- 3-FOC.ppt
KalaivaniRMECLectCSE
 
PPT
our c prog work
sravan kumar
 
PPT
Unit 3 Foc
JAYA
 
PPTX
Algorithm Design and Problem Solving [Autosaved].pptx
KaavyaGaur1
 
PPTX
vingautosaved-230525024624-6a6fb3b2.pptx
Orin18
 
PDF
LEC 5 [CS 101] Introduction to computer science.pdf
p87783936
 
PPTX
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
MarcMiguel2
 
PDF
Introduction to computing science and prograaming_1.pdf
WardhanaHalimKusuma
 
PPTX
Unit 1 c programming language Tut and notes
achiver792
 
PPTX
Computer Studies 2013 Curriculum framework 11 Notes ppt.pptx
mbricious
 
8234.docx
singsang3
 
ICP - Lecture 6
Hassaan Rahman
 
2. Algorithms Representations (C++).pptx
ssuser4d77b2
 
Ds02 flow chart and pseudo code
jyoti_lakhani
 
Fundamentals of Programming Chapter 3
Mohd Harris Ahmad Jaal
 
Introduction to programming : flowchart, algorithm
Kritika Chauhan
 
pseudocode Note(IGCSE Computer Sciences)
MKKhaing
 
Cse115 lecture03problemsolving
Md. Ashikur Rahman
 
L- 14. 0 Algorithm_Flowchart_Example.pdf
TonmoyIslam16
 
Proble, Solving & Automation
Janani Satheshkumar
 
UNIT- 3-FOC.ppt
KalaivaniRMECLectCSE
 
our c prog work
sravan kumar
 
Unit 3 Foc
JAYA
 
Algorithm Design and Problem Solving [Autosaved].pptx
KaavyaGaur1
 
vingautosaved-230525024624-6a6fb3b2.pptx
Orin18
 
LEC 5 [CS 101] Introduction to computer science.pdf
p87783936
 
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
MarcMiguel2
 
Introduction to computing science and prograaming_1.pdf
WardhanaHalimKusuma
 
Unit 1 c programming language Tut and notes
achiver792
 
Computer Studies 2013 Curriculum framework 11 Notes ppt.pptx
mbricious
 
Ad

Recently uploaded (20)

PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Ad

Pseudocode & flowchart examples

  • 1. C PSEUDOCODE & FLOWCHART EXAMPLES 10 EXAMPLES www.csharp-console-examples.com
  • 2. Pseudocode • Pseudocode is a compact and informal high-level description of a program using the conventions of a programming language, but intended more for humans. • There is no pseudocode standard syntax and so at times it becomes slightly confusing when writing Pseudocode and so let us understand pseudo code with an example.
  • 3. Pseudecode Syntax • FOR THOSE TUTORIALS I'LL USE THAT SYNTAX • INPUT – indicates a user will be inputting something • OUTPUT – indicates that an output will appear on the screen • WHILE – a loop (iteration that has a condition at the beginning) • FOR – a counting loop (iteration) • REPEAT – UNTIL – a loop (iteration) that has a condition at the end • IF – THEN – ELSE – a decision (selection) in which a choice is made • any instructions that occur inside a selection or iteration are usually indented
  • 4. Pseudocode & Flowchart Example 1 Add Two Numbers 1 2 3 4 5 6 7 8 9 BEGIN NUMBER s1, s2, sum OUTPUT("Input number1:") INPUT s1 OUTPUT("Input number2:") INPUT s2 sum=s1+s2 OUTPUT sum END
  • 5. Pseudocode & Flowchart Example 2 Calculate Perimeter of Rectangle 1 2 3 4 5 6 7 8 9 BEGIN NUMBER b1,b2,area,perimeter INPUT b1 UNPUT b2 area=b1*b2 perimeter=2*(b1+b2) OUTPUT alan OUTPUT perimeter END
  • 6. Pseudocode & Flowchart Example 3 Find Perimeter Of Circle using Radius 2 3 4 5 6 BEGIN NUMBER r, perimeter INPUT r area=3.14*2*r OUTPUT perimeter END
  • 7. Pseudocode & Flowchart Example 4 Calculate sales taxes 3 4 5 6 7 8 9 10 11 12 13 14 15 BEGIN NUMBER price, tax, taxRate, total OUTPUT "Enter Product Price" INPUT price OUTPUT "Enter tax rate amoung 1 and 100" OKU taxRate tax= price* taxRate/100 total= price + tax OUTPUT "Product tax="+tax OUTPUT "Product total price ="+total END
  • 8. Pseudocode & Flowchart Example 5 Check a Number is Positive or Negative 5 6 7 8 9 10 11 12 13 14 15 16 BEGIN NUMBER num OUTPUT "Enter a Number" OKU num IF num>0 THEN OUTPUT "Entered number is positive" ELSE IF num <0 THEN OUTPUT "Entered number is negative" ELSE OUTPUT "Entered number is zero" ENDIF END
  • 9. Pseudocode & Flowchart Example 6 Find the biggest of three (3) Numbers 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 BEGIN NUMBER num1,num2,num3 INPUT num1 INPUT num2 INPUT num3 IF num1>num2 AND num1>num3 THEN OUTPUT num1+ "is higher" ELSE IF num2 > num3 THEN OUTPUT num2 + "is higher" ELSE OUTPUT num3+ "is higher" ENDIF END
  • 10. Pseudocode & Flowchart Example 7 Print Numbers from 1 to 100 2 3 4 5 6 7 8 BEGIN NUMBER counter FOR counter = 1 TO 100 STEP 1 DO OUTPUUT counter ENDFOR END
  • 11. Pseudocode & Flowchart Example 8 Read 50 numbers and find their sum BEGIN NUMBER counter, sum=0, num FOR counter=1 TO 50 STEP counter DO OUTPUT "Enter a Number" INPUT num sum=sum+num ENDFOR OUTPUT sum END
  • 12. Pseudocode & Flowchart Example 9 Read 10 numbers and find sum of even numbers 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 BEGIN NUMBER counter, sum=0, num FOR counter=1 TO 10 STEP 1 DO OUTPUT "Enter a Number" INPUT num IF num % 2 == 0 THEN sum=sum+num ENDIF ENDFOR OUTPUT sum BİTİR
  • 13. Pseudocode & Flowchart Example 10 Calculate the Square Root of a Number BEGIN NUMBER root=1, counter=0,num OUTPUT "Enter a number for calculate the root" INPUT num WHILE sayac < sayi+1 THEN i=i+1 root=(num/root+root)/2 END WHILE OUTPUT root END
  • 14. csharp-console-examples.com For more pseudocode ve flowchart examples click here