OCJP

Arithmetic Operators in C Language

To perform any Arithmetic Operation between two variables or values arithmetic operators are used.

  • + Addition or Unary Plus
  • – Subtraction or Unary Minus
  • * Multiplication
  • / Division
  • % Modulo or Remainder after Division
#include<stdio.h>
#include<conio.h>
void main()
{
	int x,y,z;
	clrscr();
	printf("\nEnter X :");
	scanf("%d",&x);
	printf("\nEnter Y :");
	scanf("%d",&y);
	z=x+y;
	printf("\nAddition :%d",z);

	z=x-y;
	printf("\nSubstraction :%d",z);

	z=x*y;
	printf("\nMultiplication :%d",z);

	z=x/y;
	printf("\nDivision :%d",z);

	z=x%y;
	printf("\nModulo :%d",z);

	getch();
}

Do not forget to subscribe to get updated new post related to programmings.

Leave a Reply

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


× How can I help you?