From 7737192c2162a7e5093fd7625139555b7b1d5eca Mon Sep 17 00:00:00 2001 From: GET-UNKNOWN-ERR0R Date: Tue, 16 Jul 2024 12:28:05 +0530 Subject: [PATCH] Update README.md --- README.md | 87 +++++++++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 2e5015e..f4fa906 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,39 @@ -

Advanced Calculator

-This is an advanced calculator program written in C++ that performs basic arithmetic operations. It provides a menu-driven interface with colored text for enhanced user experience. The available operations are addition, subtraction, multiplication, division, and modulus. - -

Features

- -

Addition:

Adds two numbers. -

Subtraction:

Subtracts the second number from the first. -

Multiplication:

Multiplies two numbers. -

Division:

Divides the first number by the second (checks for division by zero). -

Modulus:

Computes the remainder of the division of two integers (checks for division by zero). -

Input Validation:

Ensures that the user inputs valid numeric values. -

Colored Text:

Enhances the user interface with colored text. -

Requirements

-A C++ compiler that supports C++11 or later. -

How to Compile and Run

- -g++ -o ccl.cpp -

Run the executable:

- -./ccl or ./a.out or ./a.exe - -

Code Overview

-

Functions

-

clearInput():

Clears the input stream in case of an error. -

displayMenu():

Displays the calculator menu with colored text. -

getTwoNumbers(double &num1, double &num2):

Prompts the user to input two numbers and validates the input. -

Main Loop

-The main loop of the program repeatedly displays the menu, processes user input, and performs the selected arithmetic operation until the user chooses to exit. - -

OVERVIEW

-
-MADE BY    
-        ⤡ 
-          GET UNKNOWN ERROR v2.7
-===========================
- Advanced Calculator
-===========================
-Choose an operation:
-1. Addition (+)
-2. Subtraction (-)
-3. Multiplication (*)
-4. Division (/)
-5. Modulus (%)
-6. Exit
-Enter your choice:
-
-

Error Handling

-The program handles various input errors, such as non-numeric inputs and division by zero, by displaying appropriate error messages and prompting the user to enter valid values. - -

Note

-This program uses ANSI escape codes for colored text. If your terminal does not support ANSI escape codes, the color formatting will not be displayed correctly. +# C++ Calculator + +This repository contains a simple C++ calculator program that can be automatically compiled and run using the provided scripts. + +## How to Use + +### Unix-based Systems + +1. Clone the repository: + ```sh + git clone https://github.com/your-username/cpp-calculator.git + cd cpp-calculator + ``` + +2. Run the program: + ```sh + ./run.sh + ``` + +### Windows + +1. Clone the repository: + ```sh + git clone https://github.com/your-username/cpp-calculator.git + cd cpp-calculator + ``` + +2. Run the program: + ```bat + run.bat + ``` + +### GitHub Actions + +The C++ program will also be automatically compiled and run using GitHub Actions when you push changes to the repository. + ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.