```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 ``` ```//http://en.wikipedia.org/wiki/D._R._Kaprekar /*Kaprekar Numbers Consider an n-digit number k. Square it and add the right n digits to the left n or n-1 digits. If the resultant sum is k, then k is called a Kaprekar number. For example, 9 is a Kaprekar number since 92 = 81 and 8 + 1 = 9 and 297 is a Kaprekar number since 2972 = 88209 and 88 + 209 = 297. */ //task is to write a function that identifies Kaprekar numbers //and to determine the Kaprekar numbers less than a thousand. #include #include int nodigits( int p); void kapre(long int num,long int d_num,long int sqr); int main() { long int sqn,nD; int i; clrscr(); for(i=1;i<1000;i++) { nD=nodigits(i); sqn=pow(i,2); kapre(i,nD,sqn); } getch(); return 0; } int nodigits(int p) { int j=0; while(p!=0) { p=p/10; j++; } return j; } void kapre( long int num, long int d_num, long int sqr) { long int sum1=0,revsum=0; int i; for(i=0;i
 ```1 2 3 ``` ```In function `main': undefined reference to `clrscr' undefined reference to `getch' ```