daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <cstdlib>
  3. #include <iostream>
  4.  
  5. int foo(double a, double b, double x, double y)
  6. {
  7.     return ((x*x)/(a*a) + (y*y)/(b*b));
  8. }
  9.  
  10. int main ()
  11. {
  12.     int b = 6, a = 10;
  13.     const int min = -15, max = 15;
  14.     int x = min, y = min;
  15.     for (; y < max; ++y)
  16.     {
  17.         for (x = min; x < max; ++x)
  18.             std::cout << (foo(a,b,x,y) == 1 ? '*' : '#');
  19.         std::cout << std::endl;
  20.     }
  21.     system("PAUSE");
  22.     return 0;
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top