This repository contains a collection of C++ exercises suitable for beginners. These exercises are designed to help you practice and strengthen your programming skills in C++. Each exercise focuses on a specific concept or problem-solving technique.
- Exercise 1: Hello World
- Exercise 2: Sum of Two Numbers
- Exercise 3: Even or Odd
- Exercise 4: Fibonacci Sequence
- Exercise 5: Factorial
- Exercise 6: Prime Number
- Exercise 7: Reverse a String
- Exercise 8: Palindrome
- Exercise 9: Multiplication Table
- Exercise 10: Game Number Guessing
- Exercise 11: Leap Year
- Exercise 12: Temperature Conversion
- Exercise 13: Array Sum
- Exercise 14: Array Average
- Exercise 15: Array Sorting
- Exercise 16: String Length
- Exercise 17: Count Vowels and Consonants
- Exercise 18: Sum of Digits
- Exercise 19: Power of a Number
- Exercise 20: Palindrome Array
- Exercise 21: Prime Numbers in a Range
- Exercise 22: Armstrong Number
- Exercise 23: Perfect Number
- Exercise 24: Binary to Decimal Conversion
- Exercise 25: Decimal to Binary Conversion
- Exercise 26: Factorial using Recursion
- Exercise 27: Fibonacci Series using Recursion
- Exercise 28: String Palindrome using Recursion
- Exercise 29: Check Anagram Strings
- Exercise 30: File Handling - Word Count
- Exercise 31: Matrix Addition
- Exercise 32: Matrix Multiplication
- Exercise 33: Linear Search
- Exercise 34: Binary Search
- Exercise 35: Bubble Sort
- Exercise 36: Selection Sort
- Exercise 37: Insertion Sort
- Exercise 38: Palindrome Linked List
- Exercise 39: Reverse a Linked List
- Exercise 40: Tower of Hanoi
- Exercise 41: Binary Tree Traversal
- Exercise 42: Find Maximum and Minimum in an Array
- Exercise 43: Reverse an Array
- Exercise 44: Check if Array is Sorted
- Exercise 45: Sum of Array Elements
- Exercise 46: Count the Frequency of Elements in an Array
- Exercise 47: Merge Two Sorted Arrays
- Exercise 48: Check if String is an Isogram
- Exercise 49: Calculate the Average of a Dynamic Array
- Exercise 50: Generate a Pascal's Triangle
- Exercise 51: Sum of Digits using Recursion
- Exercise 52: GCD (Greatest Common Divisor)
- Exercise 53: LCM (Least Common Multiple)
- Exercise 54: Reverse a Number
- Exercise 55: Remove Duplicate Elements from an Array
- Exercise 56: Check if String is a Pangram
- Exercise 57: Count Words in a Sentence
- Exercise 58: Check if String is a Valid Parentheses Expression
- Exercise 59: Generate Prime Numbers
- Exercise 61: Count the Number of Vowels and Consonants in a String
- Exercise 62: Find the Longest Word in a Sentence
- Exercise 63: Print the Pascal's Triangle for a Given Number of Rows
- Exercise 64: Find the Second Largest Number in an Array
- Exercise 65: Check if a Number is a Perfect Square
- Exercise 66: Count the Number of Digits in a Number
- Exercise 67: Generate a Random Password
- Exercise 68: Convert a Decimal Number to Roman Numerals
- Exercise 69: Check if a Number is a Palindrome
- Exercise 70: Calculate the Factorial of a Number using Recursion
- Exercise 71: Reverse Words in a Sentence
- Exercise 72: Check if a Number is a Perfect Number
- Exercise 73: Find the Prime Factors of a Number
- Exercise 74: Find the Sum of Prime Numbers within a Range
- Exercise 75: Check if a String is a Palindrome using Recursion
- Exercise 76: Calculate the Power of a Number using Recursion
- Exercise 77: Check if a Number is an Armstrong Number
- Exercise 78: Generate Fibonacci Numbers up to a Given Limit
- Exercise 79: Calculate the Sum of Digits in a Number using Recursion
- Exercise 80: Check if a Year is a Leap Year using Functions
- Exercise 81: Find the Factorial of a Number using Functions
- Exercise 82: Find the GCD of Two Numbers using Functions
- Exercise 83: Find the LCM of Two Numbers using Functions
- Exercise 84: Check if a Number is Prime using Functions
- Exercise 85: Calculate the Power of a Number using Functions
- Exercise 86: Count the Number of Words in a Sentence using Functions
- Exercise 87: Check if a String is a Palindrome using Functions
- Exercise 88: Find the Maximum and Minimum Values in an Array using Functions
- Exercise 89: Sort an Array in Ascending Order using Functions
- Exercise 90: Calculate the Average of an Array using Functions
- Exercise 91: Check if Two Strings are Anagrams using Functions
- Exercise 92: Find the Median of an Array using Functions
- Exercise 93: Calculate the Sum of Even and Odd Numbers in an Array using Functions
- Exercise 94: Find the Frequency of Elements in an Array using Functions
- Exercise 95: Check if a Number is a Perfect Square using Functions
- Exercise 96: Calculate the Factorial of a Number using Iteration
- Exercise 98: Generate Prime Numbers up to a Given Limit using Functions
- Exercise 99: Find the Largest Element in an Array using Functions
- Exercise 100: Find the Second Smallest Element in an Array using Functions
-
Clone the repository to your local machine.
git clone https://github.com/AlajeBash/2023_Summer_Cpp_Challenge.git
-
Navigate to the desired exercise file.
cd cplusplus-exercises/exercises
-
Compile and run the exercise using a C++ compiler.
g++ exercise_name.cpp -o exercise_name./exercise_name
-
Follow the prompts or check the program's output to interact with the exercise.
-
Solve the exercise by writing the necessary code in the provided template or by creating a new file.
-
Test your solution and verify that it produces the expected results.
-
Repeat the process for other exercises in the repository.
Feel free to explore, modify, and expand upon these exercises to further improve your C++ skills. Happy coding!
Contributions to this repository are welcome! If you have additional C++ exercises or improvements to existing exercises, please feel free to submit a pull request.
This repository is licensed under the MIT License