# Cpp-Beginner-Level-Programs **Repository Path**: codes_test/Cpp-Beginner-Level-Programs ## Basic Information - **Project Name**: Cpp-Beginner-Level-Programs - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-01 - **Last Updated**: 2025-07-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # C++ Programs Collection for Beginners > I want to challenge myself to daily solve at least one program in C++ to gain confidence in C++ syntax. > My target is add atleast **100 programs** to this github repo. > After my challenge is over, this repo is going to be a valuable resource for those who are new to programming with C++. It will contain over 100 C++ programs that cover the following topics: ## Topics Covered: - Basics - Loops - Patterns - Numbers - Arrays - Strings - Sorting - Searching - OOP - File Handling - STL - Miscellaneous ## Objectives in mind: - Practice and improve C++ programming skills - Better understanding of C++ syntax, coding conventions, and best practices - Learn to solve common problems and develop efficient solutions - Work through so many programs to gain confidence and become proficient C++ programmers. ## Programs Listing: --- ### Basics 1. Hello World Program 2. Program to add two numbers and print output 3. Check if the number is Positive or Negative Program 4. Find the ASCII value of the character program ### Loops 5. Program To Find Sum Of Series 1 + 2 + 3 + 4 + 5 + . . . . . . . . . . . . . . . . n 6. Program Print Truth Table Of XY+Z Using Loop 7. Program To Find Sum Of Series 1 + 1 / 2 ^ 2 + 1 / 3 ^ 3 + . . . . . . . . . . . . 1 / n ^ n 8. Program To Find Sum Of Series 1 + 2 + 4 + 8 + 16 + 32 + . . . . . . . . n ### Patterns 9. Program To Print Heart Pattern ![Heart Patter](3-Patterns/ProgramToFindSumOfSeries1+2+4+8+16+32+till-n-terms.png) 10. Print INDIA Pattern ``` I IN IND INDI INDIA ``` 11. Program To Find Sum Of Series 1 ^ 2 + 3 ^ 2 + 5 ^ 2 + . . . . . . . . . . . n ^ 2 12. Program To Find Sum Of Series 1 + x ^ 1 + x ^ 2 + x ^ 3 + . . . . . . . . . x ^ n 13. C++ Program To Print The Series 1 -4 7 -10. . . . . -40 14. Program To Print Half Pyramid Alternative Output: Enter the No Of Row : 6 ``` * *A *A* *A*A *A*A* *A*A*A ``` 15. Program To Find Sum Of Series x + x ^ 2 / 2 + x ^ 3 / 3 + x ^ 4 / 4 + . . . . . . . . . x ^ n / n 16. Program To Print A Given Pattern Or Series Like 12345, 5432, 234, 43, 3 17. Program For Draw A Perfect Christmas Tree using stars as below ``` Output: Enter the number of floors in the christmas Tree : 4 Enter the height of foot : 4 Enter the width of foot (should be odd) : 3 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ``` 18. Program to Print Half Pyramid using stars ``` * * * * * * * * * * * * * * * * * * * * * ``` 19. Program To Find Sum Of Series 1 / 2 + 4 / 5 + 7 / 8 + . . . . . . . . .n 20. Program To Print Reverse Half Pyramid ``` Enter number of rows: 5 * * * * * * * * * * * * * * * ``` 21. Program To Print A Pascal Triangle ``` Enter number of rows: 4 1 1 1 1 2 1 1 3 3 1 ``` ![Pascal's triangle visualization](3-Patterns/PascalTriangleAnimated2.gif) 22. Program to print daimond pattern using stars (\*) ``` Enter Diamond Star Pattern Row = 9 Diamond Star Pattern * *** ***** ******* ********* *********** ************* *************** ***************** *************** ************* *********** ********* ******* ***** *** * ``` 23. Program to Print Half Pyramid Pattern using Numbers Program ``` Enter the number of rows in the pyramid: 4 1 1 2 1 2 3 1 2 3 4 ``` 24. Half Pyramid Pattern using Characters Program ``` Enter the number of rows in the pyramid: 4 A A B A B C A B C D A B C D E ``` 25. Program to print Reverse Half Pyramid Pattern using Numbers ``` Enter the no. of rows : 4 1 2 3 4 1 2 3 1 2 1 ``` 26. Program to print Reverse Half Pyramid Pattern using Characters ``` Enter the number of rows in the pyramid: 4 A B C D A B C A B A ``` 27. Floyd's Triangle Program ``` Enter the number of rows in the pyramid: 4 1 2 3 4 5 6 7 8 9 10 ``` 28. Modified Floyd's Triangle Program ``` Enter the number of rows in the pyramid: 5 1 2 3 3 4 5 4 5 6 7 5 6 7 8 9 ``` ### Numbers 29. Program To Check Number Is Prime Or Not Using If/Else Statements 30. Program To Find Max Number Among Given Three Number Using If/Else Statements 31. Program To Check Number Is Palindrome Or Not 32. Program To Find A Grade Of Given Numbers Using Switch Case Score in subject Grade | score | grade | | :---: | :---- | | >=90 | A | | 80-89 | B | | 70-79 | C | | 60-69 | D | | 50-59 | E | | <50 | F | 33. Program Swap Two numbers without using 3rd variable 34. Program To Check Number Is Even Or Odd Using If/Else Statements 35. Program to Convert Decimal Number To Binary Number Using Loop 36. Program to calculate Standard Deviation Using Function ![](4-Numbers/standard-deviation-formula.png) 37. Swap Two number using functions and pointers 38. Program to find Fibonacci series i. Fibonacci Series up to n number of terms ii. Program to Generate Fibonacci Sequence Up to a Certain Number 39. Program To Find GCD (Greatest Common Divisor ) Using Functions 40. Find Sum of n Numbers entered by the User 41. Check whether the given Number is Even or Odd 42. Factorial of a given Number Program 43. Square root and Cube root of a given Number 44. Program to find GCD and LCM 45. Check whether the number is Armstrong or not 46. Count Number of Digits in a given Number 47. Determine Perfect Square Program 48. Determine if the Number is Prime or Composite 49. Find the Reverse of the Entered Number 50. Palindrome Check for a given Number ### Array 51. Program To Find Row In An Array That Includes The Greatest Amount Of Even Number 52. Program To Check Primeness Of An Array We are given an array of numbers. The goal is to find the count of prime numbers in that array. 53. Program To find Average Of Array Function Of Using Pointer 54. Print Reverse Order And Print Sum Of Its Element Of An Array
Different methods can be used to reverse the elements of an array like:- - [x] Reverse an array using for loop - [ ] Reverse an array using the reverse() function - [ ] Reverse an array using the user-defined function - [ ] Reverse an array using the pointers - [ ] Reverse an array using the Recursion function 55. C++ Program To Reverse An Array In O(n); Following are the various ways to get the reverse array - [ ] Reverse an array using for loop - [ ] Reverse an array using the reverse() function - [x] Reverse an array using the user-defined function - [ ] Reverse an array using the pointers - [ ] Reverse an array using the Recursion function 56. Program For Swapping Two Number In Function Using Pointer 57. C++ Program To Print Address Of Pointer Of An Array Using Pointer 58. Program To Check Evenness / Oddness Of An Array 59. How to Delete an Array element 60. Find Sum and Average of the Array Elements in C++