for(int i=0;i> arr[i]; k=getchar(arr[i]); if (k<48 || k>57) { cout << "Input correctly!"; } if(k<48 || k>57) { check++; } } }