Arithmetic Operators in C Programming

Arithmetic Operators in C Programming to perform different operators and one question arises in your mind what is arithmetic operator? and the answer is simple we use addition, Subtraction, Multiplication, and Divide into two integer values. 


Below I have shared the C program to performing Arithmetic Operators 

For example, if the user has entered 6 and 3 then the output will be: 
Enter two numbers 6
3

 Addition of a and b is 9
 Subtraction of a and b is 3
 Multiplication of a and b is 18
 The divide of a and b is 2



#include<stdio.h>  
int main()
 { 
   int a,b;
    printf(" \n Enter two numbers");
    scanf("%d%d",&a,&b);
    printf("\n Addition of a and b is %d \t",(a+b));
    printf("\n Subtraction of a and b is %d \t",(a-b));
    printf("\n Multiplication of a and b is %d \t",(a*b));
    printf("\n Divide of a and b is %d \t",(a/b));
   return 0;
 }


NOTE: You have any problem in above Arithmetic Operators in C Programming to perform Addition, Subtraction, Multiplication, and Divide into two integer values do not hesitate and write your problem in the comment box. I will support your problem.

Share this

0 Comment to "Arithmetic Operators in C Programming"

Post a Comment