0% found this document useful (0 votes)
15 views11 pages

Algorithm Flow Charts

The document provides an overview of the program development cycle and process of creating a C++ program. It discusses compiling source code into machine-readable format and the components of the compilation process flow diagram. It also defines what an algorithm is and provides an example algorithm to solve the problem of calculating how many years it takes an account earning interest to double its original balance.

Uploaded by

Muhammad Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views11 pages

Algorithm Flow Charts

The document provides an overview of the program development cycle and process of creating a C++ program. It discusses compiling source code into machine-readable format and the components of the compilation process flow diagram. It also defines what an algorithm is and provides an example algorithm to solve the problem of calculating how many years it takes an account earning interest to double its original balance.

Uploaded by

Muhammad Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

The people who are serious in

the ridiculous will be ridiculous


when facing the serious.

In this lecture
The steps to create a program
Your first C++ program

Program Development Cycle

The Process of Creating the Program


Create a source file (human-readable
code)
C++ is case-sensitive (a and A are different
objects)

C++ is free form (while space is


ignored)

File should be saved with .cpp


extention
Compile your source file (machinereadable)

Process Flow of the


Compilation Process

Components of Process Flow Diagram

Algorithm
A planning process must precede implementing
a computer program.
The computer needs a systematic approach for
finding solutions: a series of steps that involves
no guesswork.
An algorithm is a solution technique that is
unambiguous, executable, and terminating.
Unambiguous - no room for guesswork or creativity.
Executable - each step can be carried out in practice.
Terminating - the process will eventually come to an
end.

Algorithms (Example)
Problem:
You put Rs 10,000 into a bank account
that earns 5% interest per year. How
many years does it take for the
account balance to be double the
original?

Step 1: Start with the table

After Year
0

Balance
$10,000

Step 2: Repeat steps 2a-2c while balance < $20,000


Step 2a. Add a new row to the table
Step 2b. In column 1 of the new row, put one more than the preceding year's value
Step 2c. In column 2, place the value of the preceding balance value, multiplied by 1.05.
Step 3: Report the last number in the year column as the number of years required to double
the investment

Dont get intimidated after seeing


it!

You might also like