Advertisement
youuw

zad6 C

Oct 24th, 2021
1,051
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char **argv) {
  4.  
  5.     int a, b; //deklaracja zmiennych
  6.     printf("podaj pierwsza liczbe\n"); //wyswietlenie komunikatu
  7.     scanf("%d", &a); //wprowadzenie zmiennych
  8.     printf("podaj druga liczbe\n");
  9.     scanf("%d", &b);
  10.     if(a%b == 0) printf("%d", a); //jesli a jest podzielne przez b wyswietl a
  11.     else printf("%d", b); //w przeciwnym wypadku wyswietl b
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement