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!