Okay so my program has to verify if a number is prime, and that number is formed by the number of units of another numbers.
Example: for n=4 and numbers 237 23 453 11 the program will display 7331.
My problem is after I introduce n and the first number, I can't enter any other number.
cin >> x ; // for example x = 1;
while( x != 0 ) // how does x to become 0 ??
{
nr = x % 10; // infinite loop because nr = x % 10 = 1 forever
// x is never decremented
}
line 19:
OK = (x==2); // you are sure to want this? what would you like to do?