Program to perform all arithmetic operations on two integers

0
12
#include<stdio.h>
#include<conio.h>
void main()
{
  int a,b,c;    /* a,b for input and c for result */
  clrscr();
  printf("enter two integers\n);
  scanf("%d%d',&a,&b);
  c=a+b;        /* sum of two numbers */
  printf("\n sum of %d and %d = %d", a,b,c);
  c=a-b;        /* difference of two numbers */
  printf("\n difference of %d and %d = %d", a,b,c);
  c=a*b;        /* product of two numbers */
  printf("\n product of %d and %d =%d", a,b,c);
  c=a/b;        /* quiescent of two numbers */
  printf("\n quiescent of %d divided by %d = %d", a,b,c);
  c=a%b;        /* remainder of two numbers */
  printf("\n remainder after dividing %d by %d = %d", a,b,c);
  getch();
} 
  output:
  enter two integers
  20
  6
  sum of 20 and 6=26
  difference of 20 and 6=14
  product of 20 and 6=120
  quiescent of 20 divided by 6=3
  remainder after dividing 20 by 3=2
write a c program to perform all arithmetic operations on two integers c program to perform all arithmetic operations on two integers write a program to perform the arithmetic operations on two integer values perform all arithmetic operation program to perform all arithmetic operation write a program to perform all operations

LEAVE A REPLY

Please enter your comment!
Please enter your name here