Guest User

Untitled

a guest
Mar 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <unistd.h>
  4. #include <string.h>
  5.  
  6. void main (void)
  7. {
  8. while(1) // infinite loop
  9. {
  10. int a, b;
  11. printf("Give me an integer a: ");
  12. scanf("%d",&a);
  13. printf("Give me an integer b: ");
  14. scanf("%d",&b);
  15. sum = &a + &b;
  16. product = &a * &b;
  17. difference = &a - &b;
  18. echo Here is your sum, product, and difference:
  19. printf("Sum: %d + d% = %d.n", a, b, sum);
  20. printf("Product: %d * d% = %d.n", a, b, product);
  21. printf("Difference: %d - d% = %d.n", a, b, difference);
  22. return 0;
  23. }
  24. }
Add Comment
Please, Sign In to add comment