From d4d004fe83f143c64f7921023460ffb239bf8b6e Mon Sep 17 00:00:00 2001 From: Shivam Singhal Date: Fri, 2 Jun 2017 11:43:26 +0530 Subject: [PATCH] Added comments. --- GCD_of_n_numbers.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/GCD_of_n_numbers.cpp b/GCD_of_n_numbers.cpp index 4da29fb6c..3e9e9ce17 100644 --- a/GCD_of_n_numbers.cpp +++ b/GCD_of_n_numbers.cpp @@ -1,3 +1,4 @@ +//This program aims at calculating the GCD of n numbers by division method #include using namepsace std; int main() @@ -6,16 +7,17 @@ int main() cin >> n; int a[n]; int i,j,gcd; + cout << "Enter the n numbers:" << endl; for(i=0;i> a[i]; - j=1; + j=1; //to access all elements of the array starting from 1 gcd=a[0]; while(j