Beruflich Dokumente
Kultur Dokumente
• Mainframe computers
• Midsize computers
1. Hardware
− Central Processing Unit (CPU)
− Main Memory
− Secondary Storage
− Input/ Output Devices
2. Software
1. CU (Control Unit):
− Fetches and decodes instructions
3. Registers.
Sample Run:
My first C++ program.
The sum of 2 and 3 = 5
7 + 8 = 15
28
A C++ Program
cout << "My first C++ program." << endl;
Sample Run:
My first C++ program.
Sample Run:
The sum of 2 and 3 = 5
42
Example (continues)
Design algorithm:
1. Get length of Rectangle.
2. Get width of Rectangle.
3. Find the perimeter using the following equation:
Perimeter = 2 . (length + width)
4. Find the area using the following equation:
Area = length . width
43
Compiling and Linking