Skip to content

ChavanSuhani/Hacktoberfest

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 95.6%
  • Dockerfile 2.9%
  • C++ 1.5%