Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main(int argc, char** argv) {
  4.  
  5.  
  6. float x, y;
  7. printf ("Input x:");
  8. scanf ("%f", &x);
  9. printf ("Input y:");
  10. scanf ("%f", &y);
  11. if (y <=1 && y >= -x && y >= x+1) {
  12. printf ("True");
  13. }
  14. else if ( y>= -1 && y <=x && y<= x-1 ) {
  15. printf ("True");
  16. }
  17. else if ( ) {
  18. printf ("True");
  19. }
  20. if (y <=1 && y <= x-1 && y <= x) {
  21. printf ("True");
  22. }
  23. if (y >=1 && y <= -x && y <= x-1) {
  24. printf ("True");
  25. }
  26. if (y >=0 && y <= -x && y <= x-1) {
  27. printf ("True");
  28. }
  29. if (y >=0 && y <= x && y <= x+1) {
  30. printf ("True");
  31. }
  32. if (y <=0 && y >= -x-1 && y >= x) {
  33. printf ("True");
  34. }
  35. if (y <=0 && y >= -x && y >= x-1) {
  36. printf ("True");
  37. }
  38. else {
  39. printf("False");
  40. }
  41. }
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement