Toxotsist

roflanKod

Oct 27th, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <math.h>
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     setlocale(0, "");
  7.     int a = 5, b = 5, c = 100, d = 100; char matrix[200][200] = { " " };
  8.     int x, y;
  9.     for (int i = 0; i < 200; i++) {
  10.         x = ceil(i);
  11.         y = ceil(a + b * sin((c * x) + d));
  12.         matrix[y][x] = 1;
  13.     }
  14.     for (int i = 0; i < 200; i++)
  15.     {
  16.         for (int j = 0; j < 200; j++)
  17.             cout << matrix[j][i] << "\t";
  18.         cout << endl;
  19.     }
  20.  
  21.  
  22.     system("pause");
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment