Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(0, "");
- int a = 5, b = 5, c = 100, d = 100; char matrix[200][200] = { " " };
- int x, y;
- for (int i = 0; i < 200; i++) {
- x = ceil(i);
- y = ceil(a + b * sin((c * x) + d));
- matrix[y][x] = 1;
- }
- for (int i = 0; i < 200; i++)
- {
- for (int j = 0; j < 200; j++)
- cout << matrix[j][i] << "\t";
- cout << endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment