Advertisement
youuw

zad3 C

Oct 24th, 2021
826
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.67 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char **argv) {
  4.  
  5.     unsigned int a, b, c; //deklaracja zmiennych
  6.     printf("podaj pierwsza liczbe\n"); //komunikat
  7.     scanf("%d", &a); //wprowadzenie zmiennych
  8.     printf("podaj druga liczbe\n");
  9.     scanf("%d", &b);
  10.     printf("podaj trzecia liczbe\n");
  11.     scanf("%d", &c);
  12.    
  13.     printf("%d", a); //wyswietlenie zmiennych
  14.     printf("\n");
  15.     printf("%d", b);
  16.     printf("\n");
  17.     printf("%d", c);
  18.     printf("\n");
  19.    
  20.     printf("and - ");
  21.     printf("%d", a&b&c); //operacja and
  22.     printf("\n");
  23.     printf("or - ");
  24.     printf("%d", a|b|c); //operacja or
  25.     printf("\n");
  26.     printf("xor - "); //operacja xor
  27.     printf("%d", a^b^c);
  28.     printf("\n");
  29.    
  30.    
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement