Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int perm(int perm) {
- double s = perm;
- return (int (round((sin(s/10)*10))));
- }
- int main() {
- const int x = 120;
- const int y = 21;
- int matrix[x][y] = {0};
- for (int k = 0; k < x; k++)
- {
- matrix[k][perm(k)-11]++;
- }
- for (int k = 0; k < y; k++) { matrix[63][k] = 2; }
- for (int k = 0; k < x; k++) { matrix[k][10] = 2; }
- for (int q = 0; q < y; q++)
- {
- for (int b = 0; b < x; b++)
- {
- if (matrix[b][q] == 1) { cout << "="; }
- else {
- if (matrix[b][q] == 2) { cout << "="; }
- else { cout << "."; }
- }
- }
- }
- cout << matrix;
- }
Add Comment
Please, Sign In to add comment