C programming (More Maths Functions)


In this post i will be sharing you awesome code that i just wrote, I tried to cover every basic maths function like Addition,Subtraction, Multiplication, division, remainders.

#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; // Sum Function
    mult=num1*num2; // Multiplication Funtion
    div=num1/num2; //Division Function
    sub=num1-num2; //Subtraction Function
    rem=num1%num2; //Remainder Function
    printf ("The sum is : %d\n",sum); 
    printf ("The multiplication is : %d\n",mult);
    printf ("The division is : %d\n",div);
    printf ("The subsctraction is : %d\n",sub);
    printf ("The remainder is : %d\n",rem);

Leave a Reply

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