Skip to content

ahmadtanhaa/CPPPE

Repository files navigation

C++ Programming Exercises

License: MIT C++

A collection of beginner-friendly C++ programming exercises developed during my studies. The repository includes small programs that cover fundamental programming concepts such as loops, arrays, functions, classes, queues, operator overloading, and simple problem-solving.

Overview

This repository contains a set of C++ exercises designed to teach and practice core programming concepts. The codes are intentionally kept simple and educational, with minimal modifications from their original study versions.

The main purpose of this repository is to document and share these exercises in a clean and reusable form.

Repository Structure

CPPPE/
├── countdown_Beep.cpp
├── Palindrome.cpp
├── Queue_Management_1.cpp
├── Queue_Management_2.cpp
├── ticket_office.cpp
├── Transport.cpp
├── LICENSE
├── README.md
└── CITATION.cff

Topics Covered

  • Basic input and output
  • Conditional statements
  • Loops
  • Functions
  • Arrays and simple data structures
  • Queue management
  • Classes and objects
  • Constructors and methods
  • Operator overloading
  • Simple simulations
  • Beginner-level problem-solving in C++

Included Exercises

countdown_Beep.cpp

A simple countdown program that demonstrates loops, timing, and console output.

Palindrome.cpp

Checks whether a given number is a palindrome. This exercise demonstrates number manipulation, functions, loops, and conditional statements.

Queue_Management_1.cpp

A queue management exercise demonstrating basic queue operations and simple user interaction.

Queue_Management_2.cpp

An extended queue management exercise with additional logic for handling queue-related operations.

ticket_office.cpp

A simple ticket office simulation program. This exercise demonstrates basic object-oriented programming concepts and simple transaction handling.

Transport.cpp

A transport-related C++ exercise demonstrating classes, methods, and basic object-oriented programming.

How to Compile and Run

You can compile each file separately using a C++ compiler such as g++.

For example:

g++ Palindrome.cpp -o palindrome
./palindrome

Another example:

g++ Transport.cpp -o transport
./transport

On Windows, using MinGW:

g++ Palindrome.cpp -o palindrome.exe
palindrome.exe

For the queue management exercises:

g++ Queue_Management_1.cpp -o queue_management_1
./queue_management_1
g++ Queue_Management_2.cpp -o queue_management_2
./queue_management_2

Requirements

  • A C++ compiler supporting standard C++
  • Recommended: g++, MinGW, or any modern C++ IDE such as Code::Blocks, Visual Studio, or CLion

Notes

These programs were developed as study exercises. They are mainly intended for educational purposes and may not be optimized for production use.

Citation

If you use or refer to this repository, please cite it as:

@misc{Tanha_CPPPE_2026,
  author       = {Tanha, Ahmad},
  title        = {C++ Programming Exercises},
  year         = {2026},
  howpublished = {\url{https://github.com/ahmadtanhaa/CPPPE}},
  note         = {Educational C++ exercises covering loops, functions, queues, classes, operator overloading, and basic problem solving}
}

You may also cite the repository using the CITATION.cff file.

Author

Ahmad Tanha

GitHub: https://github.com/ahmadtanhaa

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

A collection of beginner-friendly C++ programming exercises covering loops, arrays, functions, classes, queues, operator overloading, and simple problem solving.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages