Advertisement
le_lukasz

Untitled

Apr 27th, 2021
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int licznik = 1;
  8.     int dzielnik1 = 7;
  9.     int dzielnik2 = 3;
  10.     int liczba = 1;
  11.     do
  12.     {
  13.         if((liczba % dzielnik1 == 0) && (liczba % dzielnik2 ==0))
  14.         {
  15.              cout << licznik << ". : " << liczba << endl;
  16.              licznik++;
  17.         }
  18.         liczba++;
  19.  
  20.     }while(licznik <= 100);
  21.  
  22.     return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement