Skip to content

Alisha-Rehman/CPP-BASICS

Repository files navigation

CPlusPlus-Basics

This is my first GitHub repository 🎉
It contains simple and easy C++ programs that cover basic concepts like:

  • Input and Output
  • Loops
  • Arrays
  • Conditional Statements
  • Functions

📂 List of Programs

  1. 01_HelloWorld.cpp — Hello World example
  2. 02_EvenOdd.cpp — Check if a number is even or odd
  3. 03_LargestNumber.cpp — Find largest of three numbers
  4. 04_Factorial.cpp — Factorial using loop
  5. 05_ArraySum.cpp — Sum of array elements
  6. 06_SquareFunction.cpp — Calculate square using function

💻 How to run (locally)

Compile with g++:

g++ 01_HelloWorld.cpp -o hello
./hello

g++ 02_EvenOdd.cpp -o evenodd
./evenodd

g++ 03_LargestNumber.cpp -o largest
./largest

g++ 04_Factorial.cpp -o factorial
./factorial

g++ 05_ArraySum.cpp -o arraysum
./arraysum

g++ 06_SquareFunction.cpp -o square
./square

About

My first C++ programs — beginner friendly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages