Advertisement
Guest User

masque1

a guest
Dec 14th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5.  
  6. void saisi (short int *n,short int *x);
  7.  
  8.  
  9.  
  10. int main(void)
  11. {
  12. short int n,x,masque;
  13. saisi(&n,&x);
  14. masque=1<<n;
  15. masque&x;
  16. printf("\n vous avez %hd et %x ",masque,masque);
  17.  
  18. printf("Hello world!\n");
  19.  
  20. return 0;
  21. }
  22. void saisi (short int *n,short int *x)
  23. {
  24.  
  25. printf("\n doneez un X \n");
  26. scanf("%hd",x);
  27.  
  28. do
  29. {
  30. printf("\n doneez un n \n");
  31. scanf("%hd",n);
  32. }while(*x>= sizeof(*x)*8);
  33.  
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement