Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
改着改着对了..........#include <stdio.h> #include <string.h> int main() { int max = 11,min = 0; char s1[100]; int num; while ( scanf ( "%d\n",&num ) ) { if ( num == 0 ) break; gets( s1 ); if ( strcmp( s1,"too high" ) == 0 && num <= max ) max = num; else if ( strcmp( s1,"too low" ) == 0 && num >= min ) min = num; else if ( strcmp(s1,"right on") == 0 ) { if ( num > min && num < max ) printf( "Stan may be honest\n" ); else printf ( "Stan is dishonest\n" ); max = 11; min = 0; } } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator