#include <iostream> #include <limits.h> using namespace std; int gcd(int a, int b) { if(b==0) return a; return gcd(b, a % b); } int main() { int a = 12, b = 54; cout<<gcd(a, b); return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter