Skip to content

This is a simple C++ project that determines the type of a given number (Natural, Whole, Integer, Rational, or Irrational). This project was inspired by a review of the number system, and it serves as a way to test C++ programming skills.

Notifications You must be signed in to change notification settings

DarkRai087/Number-Detective-in-Cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Number Type Identifier

This is a simple C++ project that determines the type of a given number (Natural, Whole, Integer, Rational, or Irrational). This project was inspired by a review of the number system, and it serves as a way to test C++ programming skills.

Table of Contents

Description

This program prompts the user to input a number in different formats, such as:

  • Integer (e.g., 2, -1)
  • Decimal (e.g., 3.14)
  • Fraction (e.g., 2/3)

Based on the input, the program determines if the number is:

  • A Natural number
  • A Whole number
  • An Integer
  • A Rational number
  • An Irrational number

Features

  • Input Handling: Accepts integers, decimals, and fractions as input.
  • Number Classification: Uses mathematical functions to identify the type of number.
  • User-Friendly Output: Displays the classification(s) of the input number.

Getting Started

Prerequisites

  • C++ Compiler (e.g., GCC)
  • Basic knowledge of C++ and number systems

Compiling and Running

To compile and run the program:

g++ number_type_identifier.cpp -o number_type_identifier
./number_type_identifier

About

This is a simple C++ project that determines the type of a given number (Natural, Whole, Integer, Rational, or Irrational). This project was inspired by a review of the number system, and it serves as a way to test C++ programming skills.

Topics

Resources

Stars

Watchers

Forks

Languages