Q 1. Problem 5 (evenly divisible) I tried the brute force method but it took time, so I referred few sites and found this code:
#include int gcd(i
I executed this statements for GCD :
#include #include int main(){ int l, s,r; printf("\n\tEnter value : "); scanf("%d %d",&l,&s); while(l%s!=0){ r=l%s; l=s; s=r; } printf("\n\tGCD = %d",s); getch(); }