Skip to content

Kirubel-Eshetu/scientific-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Scientific_Calculator

A Scientific Calculator built with C➕➕

✖️ A scientific calculator is a calculator designed to help calculate science, engineering, and mathematics problems containing a variety of operations like Trigonometric function, Logarithmic function, Factorial.

📽️ This project is to create a scientific calculator using C➕➕. On this project fundamental concepts of C➕➕ were used including functions, loops, libraries and switch statements.

1️⃣5️⃣ The built scientific calculator can perform 15 distnict operations which are: - Addition, Subtraction, Multiplication, Division, Exponent, Square root, Sine, Cosine, Tangent, Inverse of sine, Inverse of Cosine, Inverse of Tangent, Lograrithm, Logarithm with base 10 and Factorial.

🗄️ io stream and cmath Header files were used through out the project. cmath allows to use pre-defined C➕➕ mathematical functions. Switch is a type of selective statement which allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case.

⌨️ The total cases of the code are 15. When the input value(c) lies between 1️⃣ and 1️⃣5️⃣ the program takes the value as case number and performs specific operations based on the following format:

  1 = Addition
  2 = Subtraction
  3 = Multiplication
  4 = Division    
  5 = Exponent
  6 = Square root
  7 = Sine
  8 = Cosine
  9 = Tangent
  10 = Inverse of Sine
  11 = Inverse of Cosine
  12 = Inverse of Tangent
  13 = Logarithm
  14 = Logarithm with base 10
  15 = Factorial

⛔ When 0️⃣ is recieved as input, the calculator terminates.

:) On the image below you can find the implementation of the Scientific Calculator.

HTML Image

🟢👨🏾‍💻 Hope you liked the green terminal 😁

About

➕ Scientific calculator made when learning C➕➕

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages