write an oop uses euclids algorithm to display the gcd of 2 integers .the gcd of 2 nos is the largest no that divides into both nos.here is how the algorithm works .
1)find the remainder after dividing the larger no by smaller no ,using modulus operator.
2)change the larger no to smaller no & change the smaller no to remainder from step 1
3)keep doing until remainder is 0
incorporate member functions for data i/p ,displaying the result ,default constructor & constructor with 2 parameters .also create objects to reference the member functions.
2007-11-17
01:13:41
·
1 answers
·
asked by
aditya p
1