lukaszg_15
yo creo que tu presentas eso con el operador "?" sin saber como se usa un if y te reprueban! XD
por cierto... por que nadie imprime en horizontal? -.- y para que guardan en un array si no lo usan? D:
aqui está formateado y todo
#include<iostream>
using
namespace std;
int main ( ) {
char qr[21][21];
int num, c, i;
cout << ' ';
for(i = 0; i < 42; i++) cout << '-';
cout << endl;
srand(time(NULL));
for(i = 0; i < 21; i++) {
cout << '|';
for(c = 0; c < 21; c++) {
num = rand() % (2);
qr[i][c] == num;
if(qr[i][c]==0){
cout << ' ';
}else{
cout << '*';
}
cout << ' ';
}
cout << '|' << endl;
}
cout << ' ';
for(i = 0; i < 42; i++) cout << '-';
cout << endl;
system("pause");
return 0;
}