Skip to content

Tusharjamdade/pr-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Factorial and Fibonacci Calculator in C++

📌 Description

This is a simple C++ program that performs two mathematical operations based on user input:

  1. Factorial Calculation – Computes the factorial of a positive integer.
  2. Fibonacci Series Generation – Displays the Fibonacci series up to the entered number of terms.

It uses iterative logic for both operations and ensures basic input validation.


🧾 Features

  • Calculates the factorial using a loop.
  • Prints the Fibonacci series without using arrays or vectors.
  • Validates the input to ensure it's a non-negative integer.
  • Clean and modular code with separate functions for each task.

🛠 How to Compile and Run

🔧 Using g++ on Terminal or Command Prompt:

g++ main.cpp -o math_calculator
./math_calculator

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •