A beginner-friendly collection of small C++ examples for practicing programming basics in Dev-C++.
| Folder | What it teaches |
|---|---|
basics |
Variables, cin, cout, and multiplication tables |
conditions |
if/else and switch statements |
loops |
for and while loops |
practice |
Even/odd, factorial, student marks comparison, and employee bonus |
Cpp-Learning-Notes/
├── basics/
│ ├── variables.cpp
│ ├── input-output.cpp
│ └── multiplication-table.cpp
├── conditions/
│ ├── if-else.cpp
│ └── switch.cpp
├── loops/
│ ├── for-loop.cpp
│ └── while-loop.cpp
├── practice/
│ ├── even-odd.cpp
│ ├── factorial.cpp
│ ├── student-marks-comparison.cpp
│ └── employee-bonus.cpp
└── README.md
Open any .cpp file in Dev-C++, then choose Execute → Compile & Run. You can also press F11. Each file has its own main() function, so run one example at a time.
Start with the files in basics, then study conditions, followed by loops. After that, try the examples in practice without looking at the solution first.
All examples are intentionally short and use:
#include<iostream>
using namespace std;These notes are for learning and practicing C++ fundamentals through small examples that are easy to read and run. The multiplication-table example practices a for loop by printing ten multiples of a number entered by the user.