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
This problem can also be solved in a very clean way with recursion:
int gcd(int a, int b) { int remainder = a % b; if (remainder == 0) { return b; } return gcd(b, remainder); }