#include <stdio.h> _Bool sub( unsigned n ) { return n%3==0 && (n%10==5 || n/10==5); } int main( void ) { unsigned count = 0; for( unsigned i=10; i<=99; ++i ) { if( sub(i) ) { printf( "%u\n", i ); ++count; } } printf( "这样的数有 %u 个\n", count ); }