Share Info With Your Friends

       
   

C program to perform addition, subtraction, multiplication and division

C program to perform basic arithmetic operations i.e. add , subtract, multiply and divide two numbers. Numbers are assumed to be integers and will be entered by the user. 

C programming code

#include<stdio.h>

main()
{
   int first, second, add, subtract, multiply, divide;

   printf("Enter two integers\n");
   scanf("%d%d",&first,&second);

   add = first + second;
   subtract = first - second;
   multiply = first * second;
   divide = first / second;

   printf("Sum = %d\n",add);
   printf("Difference = %d\n",subtract);
   printf("Multiplication = %d\n",multiply);
   printf("Division = %d\n",divide);

   return 0;
}
Output:

Previous
Next Post »

Thanks for your feed back we will soon reply you EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng