Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <cstdlib>
- #include <iostream>
- int foo(double a, double b, double x, double y)
- {
- return ((x*x)/(a*a) + (y*y)/(b*b));
- }
- int main ()
- {
- int b = 6, a = 10;
- const int min = -15, max = 15;
- int x = min, y = min;
- for (; y < max; ++y)
- {
- for (x = min; x < max; ++x)
- std::cout << (foo(a,b,x,y) == 1 ? '*' : '#');
- std::cout << std::endl;
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement