Advertisement
Guest User

Untitled

a guest
Dec 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. void is_in(float x, float y){
  2.     x = x * 10000;
  3.     y = y * 10000;
  4.     int x2 = x;
  5.     int y2 = y;
  6.     if(x2 <= 10000 && y2 <= 10000 && x2 >= 0 && y2 >= 0){
  7.         if(sqrt(pow(x2,2) + pow(y2, 2)) >= 10000){
  8.             printf("true");
  9.         }
  10.         else{
  11.             printf("false");
  12.         }
  13.     }
  14.     else{
  15.         printf("false");
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement