donmike25 icon

ecp1016 tutorial 2(1)

donmike25 | PRO | 06/27/13 01:09:39 PM UTC | 0 ⭐ | 203 👁️ | Never ⏰ | []
C |

560 B

|

None

|

0 👍

/

0 👎

#include <stdio.h>
 
int main()
{
    int x,y,sum,difference,product,quotient,remainder;
    printf("Enter first number:\n");
    scanf("%d",&x);
    printf("Enter second number:\n");
    scanf("%d",&y);
    sum = x+y;
    difference = x-y;
    product = x*y;
    quotient = x/y;
    remainder = x%y;
    printf("Sum of x and y value is %d\n", sum);
    printf("Difference of x and y value is %d\n", difference);
    printf("Product of x and y value is %d\n", product);
    printf("Quotient of x and y value is %d\n",quotient);
    printf("Remainder of x and y value is %d\n",remainder); 
 
return 0;
}

Comments