Wednesday, 16 November 2016

Program to perform arithmetic operations

Performing Arithmetic Operations:
In this program we will perform Addition,Subtraction, Multiplication and Division

#include<stdio.h>
int main()
{
    int num1,num2;
    int sum,sub,mul,div;
    printf("Enter First Number=");
    scanf("%d",&num1);
    printf("Enter second number=");
    scanf("%d",&num2);
    sum=num1+num2;
    sub=num1-num2;
    mul=num1*num2;
    div=num1/num2;
    printf("This is Sum=%d",sum);
    printf("\nThis is Subtraction=%d",sub);
    printf("\nThis is Multiplication=%d",mul);
    printf("\nThis is division=%d",div);
    return 0;

}

OUTPUT:





2 comments: