密码问题,运行不了。。。帮帮忙。。0
程序代码:
#include < stdio.h > #include < string.h > #include < stdlib.h > void main( ) { char p[10]; char password = "119"; char time = 0; while ( time <=3 ){ printf( "Enter password:\n" ); scanf( "%s", p ); if( strcmp( p,password ) == 0 ){ printf( "OK,Welcome\n" ); break; } else time ++; } if( time == 3 ) printf( "Who are you ?" ); system( "pause" ); }出错原因如下: