Experiment Title: Algorithm/Flowchart
Experiment Title: Algorithm/Flowchart
Aim/Overview of the practical: Code and analyze to compute the greatest common divisor
(GCD) of two numbers.
2. Task to be done/ Which logistics used: The greatest common divisor (gcd) of two or more
integers, which are not all zero, is the largest positive integer that divides each of the integer.
3. Algorithm/Flowchart
Step 2: a mod b = R
Step 5: GCD = b
Step 6: Finish
#include <iostream>
int main()
int a, b;
cout << "GCD of " << a << " & " << b << " is: " << gcd(a, b);
return 0;
if (b != 0)
else
return a;
}
6. Result/Output/Writing Summary:
Output:GCD of 58 and 28 is 2.
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):