#include<stdio.h>
int main()
{
    int a=0,b=0,c=0,d=0,e=1,f=0,g=1;
    scanf("%d %d %d",&a,&b,&c);
    if(a>b)
    {
        d=a%b;
        while(e!=0)
        {
            e=b%d;
            b=d;
            if(e!=0)
            {
                d=e;
            }
        }
    }
    else if(a<b)
    {
        d=b%a;
        while(e!=0)
        {
            e=a%d;
            a=d;
            if(e!=0)
            {
                d=e;
            }
        }
    }
    printf("%d ",d);
    if(d>c)
    {
        f=d%c;
        while(g!=0)
        {
            g=c%f;
            c=f;
            if(g!=0)
            {
                f=g;
            }
        }
          printf("%d ",f);
    }
    if (c>d)
    {
        f=c%d;
        while(g!=0)
        {
            g=d%f;
            d=f;
            if(g!=0)
            {
                f=g;
            }
        }
            printf("%d",d);
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: