Simple Calculator program in C

Simple Calculator program in C

Here, you will get a simple calculator program in c programming language. This program will perform basic mathematical operations like addition, subtraction, multiplication, and division of two numbers.

Algorithm

Step 1 :  Input any two numbers.

Step 2 :  Calculate the sum of two numbers.

Step 3 :  Calculate the difference of two numbers.

Step 4 :  Calculate the product of two numbers.

Step 5 :  Calculate the quotient of two numbers.

Step 6 :  Print the sum, difference, product, quotient.

Data Flow Diagram(DFD)

DFD calculator program in c

Example Code of Calculator Program in C

Input:

Enter two values: 7 4

Output:

Addition=11

Subtraction=3

Multiplication=28

Division=1.400000

 

 

Check out our other C programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top