Skip to content

Collection of C++ programs showcasing diverse functionalities and mathematical concepts. Includes the Josephus problem simulation, Maclaurin series for sine calculation, Pascal's Triangle generator, and a prime numbers spiral checker.

Notifications You must be signed in to change notification settings

aleena-zahra/Math-Using-Cpp

Repository files navigation

Math-Using-Cpp

Welcome to the Math Using C++ repository! Here, you'll find a collection of C++ programs that cover various concepts and functionalities. Each script reflects different learning milestones and practical applications.

1. Josephus Problem Simulation

  • Simulates the Josephus problem, a classic algorithm where people stand in a circle, and every k-th person is eliminated until only one remains.

2. Maclaurin Series for Sine Calculation

  • Calculates sin(x) using the Maclaurin series approximation. Interactive user input for the value of x and the number of terms in the series.

3. Pascal's Triangle Generator

  • Generates Pascal's Triangle up to a specified number of rows. Calculates and displays the sum and product of each row.

4. Prime Numbers Spiral Checker

  • Checks whether numbers up to a specified limit, when squared, are prime. Outputs a spiral pattern indicating prime numbers.

Usage:

  • Clone the repository: git clone [https://github.com/aleena-zahra/Math-Using-Cpp]
  • Navigate to the desired script's directory.
  • Compile and run using a C++ compiler.

Feel free to explore, learn, and contribute. Happy coding! 🚀

About

Collection of C++ programs showcasing diverse functionalities and mathematical concepts. Includes the Josephus problem simulation, Maclaurin series for sine calculation, Pascal's Triangle generator, and a prime numbers spiral checker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages