程序无法运行,求大神指点
void main(){
int a[8]={3,5,7,9,11,13,15,17};
for(int i=0;i<8;i++)
{
printf("%5d",a[i]);
if((i+1)%4==0)printf("\n");
}
}
#include <stdio.h> int main( void ) { int a[8] = { 3,5,7,9,11,13,15,17 }; for( size_t i=0; i<sizeof(a)/sizeof(*a); ++i ) { printf( "%5d", a[i] ); if( (i+1)%4 == 0 ) putchar( '\n' ); } }