Thursday, March 24, 2016

Add Subtraction Multiplication Division and Remainder simple code


 Implement a program that takes 2 input numbers from the user, and prints the following:
  First Number 
  Second Number
  Addition Result
  Subtraction Result
  Multiplication Result
  Division Result
  Remainder Result




 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#include <stdio.h>
int main () {
int a,b,c;
printf ("plz enter two intger number");
scanf("%d%d",&a,&b);
c=a+b;
printf("the additional result = %d\n",c);
c=a-b;
printf("the subtraction result = %d\n",c);
c=a*b;
printf("the multiplication result = %d\n",c);
c=a/b;
printf("the division result = %d\n",c);
c=a%b;
printf("the remainder result = %d\n",c);
}


Share this

0 Comment to "Add Subtraction Multiplication Division and Remainder simple code "

Post a Comment