Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char **argv) {
- unsigned int a, b, c; //deklaracja zmiennych
- printf("podaj pierwsza liczbe\n"); //komunikat
- scanf("%d", &a); //wprowadzenie zmiennych
- printf("podaj druga liczbe\n");
- scanf("%d", &b);
- printf("podaj trzecia liczbe\n");
- scanf("%d", &c);
- printf("%d", a); //wyswietlenie zmiennych
- printf("\n");
- printf("%d", b);
- printf("\n");
- printf("%d", c);
- printf("\n");
- printf("and - ");
- printf("%d", a&b&c); //operacja and
- printf("\n");
- printf("or - ");
- printf("%d", a|b|c); //operacja or
- printf("\n");
- printf("xor - "); //operacja xor
- printf("%d", a^b^c);
- printf("\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement