A collection of beginner-friendly C++ programs solving basic programming problems, primarily inspired by GeeksforGeeks. Great for learning syntax, logic, and foundational C++ concepts.
This repository contains simple and standalone C++ programs that cover:
- Input/output operations
- Arithmetic and logic
- Conditional statements and loops
- Functions and recursion
- Basic object-oriented programming
- STL (Standard Template Library) usage
It serves as a practical resource for students and beginners who want to practice and reinforce their understanding of C++ programming.
| File Name | Description |
|---|---|
Hello.cpp | Prints "Hello, World!" |
Prime.cpp | Checks if a number is prime |
simple_interest.cpp | Calculates simple interest |
ascii.cpp | Displays ASCII values of characters |
leap_year.cpp | Checks for leap year |
factorial.cpp | Calculates factorial using loops |
recursion1.cpp | Demonstrates recursion |
reverse.cpp | Reverses a number |
palindrome.cpp | Checks if a string or number is a palindrome |
swap.cpp | Swaps two variables |
vectors.cpp | Demonstrates use of STL vector |
oopmexp12.cpp | Basic object-oriented example |
Note: Each file is self-contained and can be compiled and executed individually.
- A C++ compiler (e.g., GCC, Clang, MSVC)
- Basic command-line knowledge
- Clone the Repository
git clone https://github.com/Yash-Lade/Basic_CPP_codes.git cd Basic_CPP_codes - Compile and Run a File
g++ Prime.cpp -o prime ./prime