Skip to content

Latest commit

 

History

History

04. Calculator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Calculator Program

Overview

This project implements a simple command-line calculator that can perform basic arithmetic operations such as addition, subtraction, multiplication, and division. It includes input validation to ensure users enter valid numbers and operations.

Features

  • Performs four basic arithmetic operations: addition, subtraction, multiplication, and division.
  • Handles invalid number inputs gracefully.
  • Allows users to chain operations using the result of the previous calculation.
  • User-friendly console interface for input and output.

How to Use

  1. Run the script.
  2. Enter the first number when prompted.
  3. Choose an operation from the available options: +, -, *, or /.
  4. Enter the next number for the operation.
  5. View the result of the operation.
  6. Decide if you want to perform another operation using the result or exit the program.

Example

Calculator