Problem of GCD test cases showing wrong answer

#include
using namespace std;

int gcd(int a,int b){
if (b==0){ ///base case ;
return a ;
}else if(b>a){
swap(a,b);
}
return gcd(b,b%a); //recursive case ;
}
int main(){

 int a,b;
 cin >> a >> b;
 
 cout<<gcd(a,b);

}

what is worng with the code …
2 test case is showing wrong answer …

if i remove the swaping code then both test cases are showing wrong-answer

else if(b>a){
swap(a,b);
}

https://ide.codingblocks.com/#/s/31411

this is the correct code for gcd.

bhai pahle yahi try kar raha tha tab sare test case fail ho rahe thee
ab accept ho raha haii
thank u