Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anupam-kumar-krishnan/Competitive_Programming
/ gcd
Function
gcd
Basic Programming/euclid_gcd.cpp:4–9 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
2
using namespace std;
3
4
int gcd (int a, int b) {
5
if (b == 0)
6
return a;
7
else
8
return gcd (b, a % b);
9
}
10
int main(void){
11
int a,b; cin >> a >> b;
12
cout << gcd(a,b);
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected