CSC 111 - (7) Introduction To Programming
CSC 111 - (7) Introduction To Programming
Course Instructors:
Prof. B. S. Aribisala
Dr. U. C. Ogude
.
Programs
A program can
instruct a computer Add 1 to
to perform Counter
mathematical
operations.
Store
Entry
Exit
True
statement a
IF-THEN-ELSE
Entry
Test
condition p false true
“false” “true”
statement a Exit statement a
Iterate
A program loop is a
form of iteration. A
computer can be
instructed to repeat
instructions under
certain conditions.
No
Programs are Solutions
to Problems
Programmers arrive at these solutions by
using one or more of these devices:
Logic flowcharts
Structure charts
Pseudocode
Structured Programming
Logic Flowcharts
sum=0
Input price
sum=sum+price
Yes More
items?
No
tax=sum x 0.0725
total=sum+tax
Stop
Psuedocode
sum=0
While More items do
Input price
sum=sum+price
End While
tax=sum x 0.0725
total=sum+tax
Output sum, tax, total
The Program Development Cycle
COMPLETE THE
DOCUMENTATION