A collection of simple C and C++ practice programs to explore fundamental programming concepts—from basic arithmetic to string permutations and trigonometry.
This repository contains a set of console-based programs written in C and C++. Each program serves as a hands-on exercise for practicing different programming topics:
- Arithmetic operations
- Matrix manipulation and calculations
- Prime number utilities
- String/permutation logic
- Trigonometric calculations
Feel free to explore, compile, and modify the code as a learning experience—or use them as a starting point for more advanced projects!
| File | Description |
|---|---|
calculator.cpp |
Basic command-line arithmetic calculator |
matrix.c |
Matrix input and manipulation |
matrixSum.c |
Sum elements of a matrix |
prime.c |
Prime number checker |
primeOperation.c |
Advanced prime-related functions |
password-permutation.c |
Generate permutations of a string/password |
trigonometry-calculator.cpp |
Compute sine, cosine, tangent, etc. |
Compile and run each program using gcc (for C) or g++ (for C++). Replace <filename> with the actual source file name.
# Compile
gcc matrix.c -o matrix
g++ calculator.cpp -o calculator
# Run
./matrix
./calculator
# Program