C programming (More Arithmetic operations)

#include <stdio.h>
#include <conio.h>

int main(void)
{
    int num1,num2,sum,mult,div,sub,rem;
    printf ("Enter the first value : ");
    scanf ("%d",&num1);

    printf ("Enter the second value : ");
    scanf ("%d",&num2);

    sum=num1+num2;
    mult=num1*num2;
    div=num1/num2;
    sub=num1-num2;
    rem=num1%num2;

    printf ("The sum is : %d\n",sum); // Sum function
    printf ("The multiplication is : %d\n",mult);//Multiplication funtion
    printf ("The division is : %d\n",div);//Devision function
    printf ("The subsctraction is : %d\n",sub);//Substraction function
    printf ("The remainder is : %d\n",rem);//Remainder function

    getch();

    }

Leave a Reply

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