home *** CD-ROM | disk | FTP | other *** search
- #include <conio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
-
- main()
- {
- char bBuf[ 16 ], *p, i;
-
- printf( "\nKTR --- KT-FleaMarket 2.13 Register" );
-
- printf( "\nEnter you telephone:");
- bBuf[ 0 ] = 11;
- cgets( bBuf );
- p = &bBuf[ 2 ];
- if( atoi( p ) == 0 ){
- printf( "\nYour must input your telephone with all Number" );
- exit( -1 );
- }
- i = 0;
- while( *p ){
- i += ( *p++ ) - '0';
- }
-
- sprintf( bBuf, "%f", 657483.0*657483.0*i );
- bBuf[ 10 ] ='\0';
- printf( "\nYour Register code is: %s", bBuf );
- }