Subtraction
Posted by JanWan
Last Updated: March 02, 2012
/*Program to calculate the product of two number*/
# include <stdio.h>

int a, b, c;

int Difference (int x, int y);

main()
{
/*input the first number*/
printf("Enter a number between 1 and 100: ");
scanf("%d", &a);
/*Input the second number*/
printf("Enter a number between 1 and 100: ");
scanf("%d", &b);
/*Calculate and display the product*/
c = Difference(a, b);
printf("%d minus %d = %d\n", a, b, c);
return 0;
}

/*Function returns the product of its two arguments*/
int Difference(int x, int y)
{
return (x - y);
}

Related Content