0-N-0计数的优化写法

采用取余%的写法:

int i = 0;

while( 1 ) {
  printf( "%d
", i );
  i = ( i + 1 ) % ( N + 1 );
}
原文地址:https://www.cnblogs.com/uestcliming666/p/10296654.html