Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #define debug(tl) cerr<<#tl<<' '<<tl<<'\n';
- #include <iostream>
- #include <stdio.h>
- #include <math.h>
- //#include <windows.h>
- using namespace std;
- #define all(d) d.begin(), d.end()
- typedef long double ld;
- signed main() {
- /*
- #ifdef _DEBUG
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif
- */
- ios_base::sync_with_stdio(false);
- cin.tie(nullptr);
- cout.tie(nullptr);
- int w = 120, h = 30;
- ld k1 = (ld)w / h, k2 = 11.00/24.00;
- char* scr = new char[w * h + 1];
- scr[w * h] = '\0';
- for (int d = 0; d < 1000000; d++) {
- for (int i = 0; i < w; i++) {
- for (int j = 0; j < h; j++) {
- ld x = (ld)i / w * 2.0 - 1.0, y = (ld)j / h * 2.0 - 1.0;
- char c = ' ';
- x *= k1, x *= k2;
- x += tan(d*0.0008);
- if (x * x + y * y <= 0.5 && x * x + y * y >= 0.20) c = '@';
- scr[i + j * w] = c;
- }
- }
- printf(scr);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement