Skip to content

A simple calculator project written in C# to perform calculations such as addition, subtraction, multiplication, division, exponents, square roots, and trigonometric functions like Sine, Cosine and Tangent.

License

Notifications You must be signed in to change notification settings

Bashorun407/CalculatorProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CalculatorProject

This project was a Class Challenge project written by from (27th April 2023 to 28th April 2023). The following describes what the project is intended to do:

  1. Calculator (Sheyi & Emeka) Write a program that prompts the user for two numbers and an arithmetic operator (+, -, *, /), and performs the calculation based on the operator entered. Additional:  Write a program that prompts the user for two numbers and an arithmetic operator (+, -, *, /), and performs the calculation based on the operator entered.  Error Handling: Add error handling to your program, so that it can handle invalid input from the user. For example, if the user enters a non-numeric value for one of the numbers, or enters an invalid operator, the program should display an error message and prompt the user to enter valid input.  Multiple Operations: Modify your program to allow the user to perform multiple calculations in a row, without having to re-enter the numbers each time. For example, after performing a calculation, the program could prompt the user to enter another operator and number to perform a new calculation.  Decimal Precision: Add support for decimal precision, so that your program can handle calculations with decimal numbers. You could prompt the user to enter the number of decimal places to round the result to, or allow the user to enter decimal numbers directly.  Complex Operations: Expand the range of operations that your program can handle, such as calculating exponents, calculating square roots, or performing trigonometric calculations.

The project was written and tested with Visual Studio 2022 version. The project has been tested to carry out addition, subtraction, multiplication, division, exponents, square roots and trigonometric functions effectively. Note: Care was taken to convert user input to radian before applying trigonometric functions. This ensured that basic trigonometric functions of Sine, Cosine and Tangent were done accurately.

The instructor stated that the project should be written in Program.cs file. This is the reason all the methods and implementation was written in the Project.cs file.

About

A simple calculator project written in C# to perform calculations such as addition, subtraction, multiplication, division, exponents, square roots, and trigonometric functions like Sine, Cosine and Tangent.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages