- #1
Saladsamurai
- 3,020
- 7
Okay, so the object of this program is to write my name using an m x n array so that it prints each letter made up of that letter. That is, the first letter is B and thus is made up of a bunch of B's. Here is my code...I do not know what the problem is?
this is the output it is giving me
Code:
#include <iostream>
#include <cstring>
using namespace std;
int main ()
{
int i,j;
char B[7][13]={
{"BBBBBBBBBBBB"},
{"BB BBBBBB"},
{"BB BBB "},
{"BB BB "},
{"BB BBBB "},
{"BB BBBBB"},
{"BBBBBBBBB "}};
for (i=0;i<7;i++)
{
for (j=0;j<12;j++)
{
cout << B[i][j];
}
}
cout << endl;
system ("PAUSE");
return 0;
}
this is the output it is giving me
Code:
BBBBBBBBBBBBBB BBBBBBBB BBB BB BB BB BBBB BB BBBBBBBBBBBBB
B
Press any key to continue . . .