Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int x = 0,  y = 0 ,somme = 0 ,soustraction,produit,quotient;
  7.  
  8.     printf("Saisie un nombre : ");
  9.     int i = scanf("%d", &x);
  10.     printf("Saisie un deuxieme nombre : ");
  11.     i = scanf("%d", &y);
  12.     somme = x + y;
  13.     printf("%d + %d = %d \n", x, y,somme);
  14.     soustraction = x - y;
  15.     printf("%d - %d = %d \n", x, y, soustraction);
  16.     produit = x * y;
  17.     printf("%d * %d = %d \n", x, y, produit);
  18.     quotient = x / y;
  19.     printf("%d / %d = %d \n", x, y, quotient);
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement