# Calculator In C# With Source Code

This calculator program is a windows C# application programmed in Visual Studio. It’s essentially a basic Windows calculator re-coded from scratch, with a few functions of a scientific calculator. This Calculator program can be really useful for students or people who want to see how the “engine” code is separated from the GUI in a program. Calculator C# can perform anything the Windows Standard calculator can do.

### Features of Calculator In C#

• Use the (…) to perform an expression using the order of operations
• Perform sine, cosine, and tangent function in either degree or radian mode)
• Format the display to include comma seperators
• Insert Pi with the click of a button
• Use your keyboard for faster work
• Add comma seperators for easier viewing

Application Screenshot:

Button Definitions of Calculator

• MC: Clears memory
• MR: Recalls memory
• M: Stores memory
• M+: Adds the current display to the memory, but does not display the sum
• sin, cos, tan: Performs said trig operation on current display
• Degrees:All trig calculations take degree values
• pi: Replace the display with the value for pi
• (…): When the parentheses is turned on, all numbers typed in will be remembered and final result will follow order of operations
• CE: Clears the current entry (Does not delete last input)
• C: Clear All (Reset Calculator)
• Backspace: Delete the last digit on the display one at a time
• +: Add to the currently displayed number
• -: Subtract from the currently displayed number
• *: Multiply the currently displayed number by
• /: Divde the currently displayed number by
• sqrt: Gets the square root of the number on the display
• %: Display the result of the multiplication between two numbers as a percentage. (Ex. 50*25% = 12.5) You can also use the other operations by clicking one number, the operation you want, another number, then the %, then hit =, for example: 50 + 25% (of 50) = 62.5
• 1/x: Inverses th enumber on display (Ex. Inverse of 2 is 1/2, or 0.5)
• +/-: Change the sign of the displayed number (positive/negative)
• .: Insert a decimal point to stard adding digits after the decimal
• 0-9: Put the pressed number on the screen

Installation Steps: