Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int x;
  8. int y;
  9. int x1 = 0;
  10. int y1 = 0;
  11. int r = 2;
  12. cout << "podaj wspolrzedne punktu p(x,y): ";
  13. cin >> x >> y;
  14. if(x<0 && y<0){
  15. cout << "Punkt P nalezy do II cwiartki"<<endl;
  16. }
  17. else cout <<"Punkt P nalezy do I cwiartki"<<endl;
  18. if(((x1-x)*(x1-x)+(y1-y)*(y1-y))<=r){
  19. cout << "Punkt P zawiera sie w okregu o srodku S(0,0)";
  20. }
  21. else cout << "Punkt P nie nalezy do okregu o srodku S(0,0)";
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement