Algorithm and Flowchart Simple Calculator

Algorithm :


  1.  Initialize val1, val2, oprs, result
  2.  Input val1
  3.  Input val2
  4.  Choose operation (oprs) from +, -, x or :
  5.  If you choose operation (+), then the result = val1 + val2
  6.  If you select operation (-), then result = val1 - val2
  7.  If you select operation (x), then result = val1 * val2
  8.  If you select operation (:), then result = val1 / val2
  9.  Print results

And this is the flowchart :







Comments

Popular posts from this blog

Quantization of Image Data Implementation in C#

Computer Graphics Project "Planet Orbit" Source Code with Glut OpenGL

Computer Graphics Project "MINION" Source Code with Glut OpenGL