#include <stdio.h>
#include <conio.h>
int main()
{
int x, y, sum, diff, prod, qout;
printf("Enter value for x: ");
scanf("%d", &x);
printf("Enter value for y: ");
scanf("%d", &y);
sum = x + y;
diff = x - y;
prod = x * y;
qout = x / y;
printf("\nThe sum of %d and %d is: %d", x, y, sum);
printf("\nThe difference of %d and %d is: %d", x, y, diff);
printf("\nThe product of %d and %d is: %d", x, y, prod);
printf("\nThe qoutient of %d and %d is: %d", x, y, qout);
getch();
return 0;
}
#include <conio.h>
int main()
{
int x, y, sum, diff, prod, qout;
printf("Enter value for x: ");
scanf("%d", &x);
printf("Enter value for y: ");
scanf("%d", &y);
sum = x + y;
diff = x - y;
prod = x * y;
qout = x / y;
printf("\nThe sum of %d and %d is: %d", x, y, sum);
printf("\nThe difference of %d and %d is: %d", x, y, diff);
printf("\nThe product of %d and %d is: %d", x, y, prod);
printf("\nThe qoutient of %d and %d is: %d", x, y, qout);
getch();
return 0;
}
#include <stdio.h>
#include <conio.h>
int main()
{
int x, y;
printf("Enter value for x: ");
scanf("%d", &x);
printf("Enter value for y: ");
scanf("%d", &y);
printf("\nThe sum of %d and %d is: %d", x, y, x + y);
printf("\nThe difference of %d and %d is: %d", x, y, x - y);
printf("\nThe product of %d and %d is: %d", x, y, x * y);
printf("\nThe qoutient of %d and %d is: %d", x, y, x / y);
getch();
return 0;
}
#include <conio.h>
int main()
{
int x, y;
printf("Enter value for x: ");
scanf("%d", &x);
printf("Enter value for y: ");
scanf("%d", &y);
printf("\nThe sum of %d and %d is: %d", x, y, x + y);
printf("\nThe difference of %d and %d is: %d", x, y, x - y);
printf("\nThe product of %d and %d is: %d", x, y, x * y);
printf("\nThe qoutient of %d and %d is: %d", x, y, x / y);
getch();
return 0;
}
Here's the output of the program:
0 comments:
Post a Comment