Skip to content

A bunch of code for algorithm exercising written with C++

License

Notifications You must be signed in to change notification settings

xaprier/cpp-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Socials

       

C++ Exercises

  • This content includes array/matrix/loops/conditional-statements/methods/algorithm exercises for C++
  • All the codes written by xaprier.

Contents

  • Arrays
    • Ex1a.cpp
      • Write a program in C++ to store elements and print it.
    • Ex1b.cpp
      • Write a program in C++ to read n number of values in an array and display it in reverse order.
    • Ex1c.cpp
      • Write a program in C++ to find the sum of all elements of the array
    • Ex1d.cpp
      • Write a program in C++ to copy the elements of one array into another array.
    • Ex1e.cpp
      • Write a program in C++ to count a total number of duplicate elements in an array.
    • Ex1f.cpp
      • Write a program in C++ to print all unique elements in an array.
  • Conditional Statements
    • Ex1a.cpp
      • Write a C++ program to accept two integers and check whether they are equal or not
    • Ex1b.cpp
      • Write a C++ program to check whether a given number is even or odd.
    • Ex1c.cpp
      • Write a C++ program to check whether a given number is positive or negative.
    • Ex1d.cpp
      • Write a C++ program to find whether a given year is a leap year or not.
    • Ex1e.cpp
      • Write a C++ program to find the largest of three numbers.
    • Ex1f.cpp
      • Write a C++ program to accept a coordinate point in a XY coordinate system and determine in which quadrant the coordinate point lies.
    • Ex1g.cpp
      • Write a C++ program to check whether a triangle can be formed by the given value for the angels.
    • Ex1h.cpp
      • Write a program in C++ to read any day number in integer and display day name in the word.
    • Ex1i.cpp
      • Write a program in C++ to read any digit, display in word.
    • Ex1j.cpp
      • Write a program in C++ to read any Month number in integer and display Month name in the word.
    • Ex1k.cpp
      • Write a program in C++ to read any month number in integer and display the number of days for this month.
  • For Loops
    • Ex1a.cpp
      • Write a program in C++ to display the first 10 natural numbers.
    • Ex1b.cpp
      • Write a program in C++ to find the sum of first 10 natural numbers.
    • Ex1c.cpp
      • Write a program in C++ to display n terms of natural number and their sum.
    • Ex1d.cpp
      • Write a program in C++ to read 10 numbers from keyboard and find their sum and average.
    • Ex1e.cpp
      • Write a program in C++ to display the cube of the number upto given an integer.
    • Ex1f.cpp
      • Write a program in C++ to display the multiplication table of a given integer.
    • Ex1g.cpp
      • Write a program in C++ to display the multiplication table vertically from 1 to n
    • Ex1h.cpp
      • Write a program in C++ to display the n terms of odd natural number and their sum
    • Ex1i.cpp
      • Write a program in C++ to display of n in length of a right triangle.
    • Ex1j.cpp
      • Write a program in C++ to display of n in length of a right triangle. (Different pattern)
    • Ex1k.cpp
      • Write a program in C++ to display of n in length of a right triangle. (Different pattern)
    • Ex1l.cpp
      • Write a program in C++ to display with n rows of a right triangle.
    • Ex1m.cpp
      • Write a program in C++ to display with n rows of a right triangle. (Different pattern)
    • Ex1n.cpp
      • Write a program in C++ to display with n rows of a right triangle. (Different pattern)
  • PrintingAlphabet
    • Will be recode. After completed, the contents will be added.
  • arrayFindRepeat.cpp
    • Find the repeat count in array.
  • arrayTranspose.cpp
    • Find and write the transpose of a matrix.
  • calculator.cpp
    • Basic calculator.
  • calculatorWithPointers.cpp
    • Basic calculator which includes Pointer Arithmetic and print all done operations after complete.
  • findLocationOfMaximumElement.cpp
    • Find the maximum value and tell us the location/locations of element in matrix.
  • findPrimeNumbers1.cpp
    • Find the prime numbers between 1 and n, display and count it.
  • findPrimeNumbers2.cpp
    • Find the prime numbers between 1 and n, display and count it. Another solution.
  • matrixCalculator.cpp
    • Matrix Calculator with the rules. Will be recode for English
  • matrixColumAndRowAndDiagonalAddition.cpp
    • Addition each row, column and addition of diagonal for matrix.
  • numberBaseConverter.cpp
    • Number base converter for each convert. Will be recode for English(if im not lazy (:)
  • separateOddsAndEvens.cpp
    • Separate odds and evens to another array from given array.
  • sortMatrix.cpp
    • Sort the matrix column and row wised.
  • sortMatrixColumns.cpp
    • Sort the matrix column wised.
  • sortMatrixRows.cpp
    • Sort the matrix row wised.
  • squareWithArea.cpp
    • Print a square with the area at the middle of square.
  • triangle.cpp
    • Basic triangle pattern.

About

A bunch of code for algorithm exercising written with C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages