Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. int a,b;
  7.  
  8. int rekurencja(int a,int b){
  9.  
  10. if(b==0) return a;
  11. else return rekurencja(b,a%b0);
  12.  
  13. }
  14.  
  15. int main(){
  16. cout << "Podaj a:";cin>>a;
  17. cout << "Podaj b:";cin>>b;
  18. cout << rekurencja(a,b);
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement