123456
char a[3]={'A','B','C'}; char b[3]={'@','#','$'}; for( int i=0; i < 3; i++ ) for( int j=0; j < 3; j++ ) printf( "%c%c,", a[i], b[j] );
12345678910111213141516171819202122
// Print chars.cpp : main project file. #include <iostream> using namespace std; int main() { char a[3]={'A','B','C'}; char b[3]={'@','#','$'}; for( int i=0; i < 3; i++ ) { for( int j=0; j < 3; j++ ) { printf( "%c%c", a[i], b[j] ); if(i!=2 || j!=2) printf(","); } } printf("\n"); }