I'm just getting my feet wet with C++ and could do with some pointers (no pun meant) with the logic of programming..
I'm trying to write a very basic and small program to work out the Higest Common Factor of 2 int numbers, as entered by the user.
Please don't laugh, but here is my effort, which does not work.
I'm looking for your comments on where I've gone wrong...
Sorry if this is a muppet question.
int num1, num2, factor=0, factor1, factor2;
cout<<"Enter the first number ";
cout<<"Enter the second number ";
while(num1%factor!=0 && num2%factor!=0);
cout<<"Factor is "<<factor;
Hope you can 'show me the light'..
Cheers fellas (and any ladies, to be PC)
[code][/code]tagged by Salem