Week 3 Activity
Week 3 Activity
Programming
Key
Concepts
C A M A R I N E S S U R P O LY T E C H N I C C O L L E G E S | C O L L E G E O F C O M P U T E R S T U D I E S
ALGORITHM
• An algorithm is a step-by-step procedure Example: A simple algorithm to find the factorial of a
for solving a problem. In C++, it's typically number
implemented as a function. The function
takes input, performs specific operations
on it, and produces output.
1. Include Directives: These lines include header files that provide access to
predefined functions, classes, and data types. For example, #include
<iostream> provides access to input/output functions like cout and cin.
4. Variables: Variables are used to store data values. They have a data type,
such as int for integers or double for floating-point numbers.