#include<stdio.h>
int main()
{
int a,b,c;
(printf("\nEnter 2 no.s"))?(scanf("%d%d",&a,&b))?(c=(a>b)?a:b):0:0;
while(c>=1)
{if(a%c==0 && b%c==0)
{printf("\nGCD:%d",c);return 0;}
c--;
}
}
compzets 0 Newbie Poster
compzets 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
thines01 401 Postaholic Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.