I am completly lost on this could someone point me in the right direction into where I am going wrong with this code.
#include <iostream>
using namespace std ;
int main()
{
int x ;
int y ;
int temp ;
int remainder ;
// read in the two integers
cout << endl ;
cout << "Enter the first number (positive integer) : " ;
cin >> x ;
cout << "Enter the second number (positive integer) : " ;
cin >> y ;
//echo inputs
cout << "Input numbers are: " << x << " , " << y << endl ;
if (x < y) ;
{ // exchange values of x and y;
temp = x;
x = y;
y = temp;
}
/* At this point we will always have x >= y */
remainder = (x % y);
while (remainder != 0);
{
x = y;
y = remainder;
remainder = (x % y);
}
// display the result
cout << endl ;
cout << "The GCD is: " << y << endl ;
return (0); // terminate with success
}