Welcome to this program, In this program we will take numbers as input from
  user and perform different arithmetic operations like addition , subtraction and
  multiplication by just simply making operations between input numbers and 
  we will display the result on the screen.

  Program 
  #include<stdio.h>
  int main()
 {
  int n1 , n2 , add , mul , sub;
  printf("Enter the first and second number = ");
  scanf("%d%d",&n1,&n2);
  add=n1+n2;
  mul=n1*n2;
  sub=n1-n2;
  printf("Addition of two number is = %d\n",add);
  printf("Multiplication of two number is = %d\n",mul);
  printf("Subtraction of two number is = %d",sub);
  return 0;
 }
 Output:

here, add , sub and mul are variable names designates addition , subtraction and multiplication
and you can clearly see in the output screen that first number is 9 and second is 4 and got results accordingly ..
Note-- For taking another input you can either use a Tab , Space bar or Enter.
                                                                      << Back






Post a Comment

Previous Post Next Post