ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1712. Cipher Grille

HELP please
Posted by SamGTU5_Ukhova_Yulia_Alexandrovna 20 May 2013 21:56
here my program, prompt in what a mistake. when I send to check the error of compilation writes...
#include <iostream>
using namespace std;

void main() {
const int n = 4;
char Resh[n][n], OldResh[n][n], Shifr[n][n];

for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
cin » Resh[i][j];
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
cin » Shifr[i][j];

for (int k = 0; k < 4; k++) {
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
if (Resh[i][j] == 'X') cout « Shifr[i][j];

for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
OldResh[i][j] = Resh[i][j];
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
Resh[i][j] = OldResh[n - 1 - j][i];
}

system("pause");
}

Edited by author 24.05.2013 01:05