Maximum GCD of two numbers possible by adding same value to them | C ++ implementation of above approach . ; Function to calculate maximum gcd of two numbers possible by adding same value to both a and b ; Driver Code ; Given Input
#include <iostream> NEW_LINE using namespace std ; void maxGcd ( int a , int b ) { cout << abs ( a - b ) ; } int main ( ) { int a = 2231 ; int b = 343 ; maxGcd ( a , b ) ; return 0 ; }