# include
Int main ()
{
Int a [20], I, num, j, n=0;
For (I=0;; I++)
{
Scanf_s (" % d ", & amp; A [I]);
If (a [I]=='\ n')
{
Num=I - 1;
break;
}
}
For (I=0; i
{
If (a [I]!=a [j])
N++;
}
Printf (" % d \ n ", n);
return 0;
}
CodePudding user response:
Is what's the problem?CodePudding user response:
Yes main input is the place my infinite loopI want to press enter to end
CodePudding user response:
10 you input is overCodePudding user response:
# include
Int main ()
{
Int a [20], I, num, j, n=0;
For (I=0;; I++)
{
Scanf_s (" % d ", & amp; A [I]);
If (a [I]=='\ n')
{
Num=I - 1;
break;
}
}
For (I=0; iFor (j=I + 1; J & lt; Num - I; J++)
{
If (a [I]!=a [j])
N++;
}
Printf (" % d \ n ", n);
return 0;
}
To help you with a code block first, convenient, input \ n ASCII, 13