Skip to content

fereshtehmassoumi/Simple-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Calculator

Calculator with c#

Simple Calculator (C#)

A simple calculator project built with C# to practice classes, methods (functions), and basic programming logic.

Features

  • Addition (+)
  • Subtraction (-)
  • Multiplication (×)
  • Division (÷)
  • Input validation (basic)

Project Structure

  • Calculator class: contains methods for each operation
    • Add(a, b)
    • Subtract(a, b)
    • Multiply(a, b)
    • Divide(a, b)

How It Works

  1. The user enters two numbers.
  2. The user selects an operation (+, -, ×, ÷).
  3. The program calls the corresponding method from the Calculator class.
  4. The result is displayed.

How to Run

Option 1: Visual Studio

  1. Open the project in Visual Studio
  2. Press F5 (Start)

Option 2: Command Line (optional)

  1. Open the project folder
  2. Run:
    dotnet run

About

Calculater with c#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages