Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char **argv) {
- int a, b; //deklaracja zmiennych
- printf("podaj pierwsza liczbe\n"); //wyswietlenie komunikatu
- scanf("%d", &a); //wprowadzenie zmiennych
- printf("podaj druga liczbe\n");
- scanf("%d", &b);
- if(a%b == 0) printf("%d", a); //jesli a jest podzielne przez b wyswietl a
- else printf("%d", b); //w przeciwnym wypadku wyswietl b
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement