Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
- void main (void)
- {
- while(1) // infinite loop
- {
- int a, b;
- printf("Give me an integer a: ");
- scanf("%d",&a);
- printf("Give me an integer b: ");
- scanf("%d",&b);
- sum = &a + &b;
- product = &a * &b;
- difference = &a - &b;
- echo Here is your sum, product, and difference:
- printf("Sum: %d + d% = %d.n", a, b, sum);
- printf("Product: %d * d% = %d.n", a, b, product);
- printf("Difference: %d - d% = %d.n", a, b, difference);
- return 0;
- }
- }
Add Comment
Please, Sign In to add comment