GCD ( M, N ) {
If N > M then return GCD ( N, M )
else If N = 0 then return M
else return GCD ( N, MOD ( M, N) )
}

It is simple to covert it to C#
Also it is for two input

For three input

GCD ( M, N, O ){
return GCD ( M, GCD ( N, O ) )
}

Hie,

Thanks buddy, but i didnt really get the algo.
Heres the one from me: =======
1 Input: num type variables M,N, HCF. (eg: M=100, N=125)
2 Find the smaller one from M,n. (eg: smaller: M)
3 Start a loop from M to M/2. (eg: i=m;i<=m/2;i++)
___1 Check whether i%m=0 & i%n==0.
___2 HCF = i; break;

Im trying to make a program that shifts all my elements of array to the right by one and move the last element
into the first position.how would i move ...

I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...