Last active
November 11, 2018 06:14
-
-
Save dertst/52dd18d8d9032c5b45a0931c4c2fe1c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pch.h" | |
#include <iostream> | |
#include <Windows.h> | |
void ShifruemoeSoobshenie(char a[][],int d, int size) | |
{ | |
FILE *f; | |
fopen_s(&f, "C:\\temp\\laba.txt", "rt"); | |
int size; | |
int d; | |
fscanf_s(f, "%d", &size); | |
printf("введите ключ"); | |
scanf_s( "%d", &d); | |
for (int i = 0; i < size; i++) | |
{ | |
for (int j = 0; j < size; i++) | |
{ | |
fscanf_s(f, "%d", &a[i][j]); | |
fprintf(f, "%d", a[i][j]); | |
} | |
printf("\n"); | |
} | |
fclose(f); | |
} | |
void Shifrovka(char a[][],int d,int size) | |
{ | |
int j = 0; | |
for (int i = 0; i < size*d; i++) | |
{ | |
printf("%d", a[i][j]); | |
} | |
} | |
void Dehifrovka(char a[][], int d, int size) | |
{ | |
int j = 0; | |
for (int i = 0; i < size*d; i++) | |
{ | |
printf("%d", a[i][j]); | |
if ((i%size == 0) or (i%size == 1) or (i%size == 2) or (i%size == 3)) | |
{ | |
printf("\n"); | |
} | |
} | |
} | |
int main() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment