Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Cley
#include <iostream> #include <stdlib.h> #include <stdlib.h> using namespace std; int main() { int i,j; char tablero[8][8]; for(i=0; i<8; i++) { for(j=0; j<8; j++) { if(i==1 || i==6) { tablero[i][j]='P'; } else if((i==0 && j==0) || (i==0 && j==7) || (i==7 && j==0) || (i==7 && j==7)) { tablero[i][j]='T'; } else if((i==0 && j==1) || (i==0 && j==6) || (i==7 && j==1) || (i==7 && j==6)) { tablero[i][j]='C'; } else if((i==0 && j==2) || (i==0 && j==5) || (i==7 && j==2) || (i==7 && j==5)) { tablero[i][j]='A'; } else if((i==0 && j==3) || (i==7 && j==3)) { tablero[i][j]='Q'; } else if((i==0 && j==4) || (i==7 && j==4)) { tablero[i][j]='R'; } else{ tablero[i][j]='\0'; } } } for(i=0; i<8; i++) { printf("\n"); for(j=0; j<8; j++) { printf("%c", tablero[i][j]); } } return 0; }
run
|
edit
|
history
|
help
0
Subarray with 0 sum
WeekAgenda
cppPyBatScoreSOLID
water drop/ water land
Segmented Sieve
Clementina
figa gratis
Building squares using smallest amount of matches
precision and fixed point notation
Using C's sprinf() Function to Format Output String