Facebook
From mateusz, 1 Month ago, written in C++.
Embed
Download Paste or View Raw
Hits: 25
  1. //algorytm Euklidesa
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.         int a, b;
  7.         while(a!=b)
  8.         {
  9. cout<<"wpisz wartosc a: ";
  10. cin>>a;
  11. cout<<"wpisz wartosc b: ";
  12. cin>>b;
  13. }
  14. {
  15.         if(a>b)
  16.         a=a-b;
  17.         else
  18.         b=b-a;
  19. }
  20. cout << a;
  21. }
  22.  

Replies to dasd rss

Title Name Language When
Re: dasd Crimson Cat cpp 1 Month ago.