<root|desktop> cc ceshi1.c -o ceshi1 <root|desktop> ./ceshi1 请输入行数与列数 4 5 01234 01234 01234 01234
#include <stdio.h> void prin( int,int ); int main( void ) { int m; int n; puts("请输入行数与列数"); scanf( "%d%d", &m,&n ); prin( m,n ); return 0; } void prin( int x, int y ) { int i,p; for( i = 0; i < x; i++ ) { for( p = 0; p < y; p++ ) printf( "%d",p ); printf( "\n" ); } }
[此贴子已经被作者于2022-12-1 17:26编辑过]