Guest User

Untitled

a guest
Jan 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. void main (void)
  5.  
  6. {
  7. int x;
  8. int y;
  9.  
  10. printf("Introduza o valor de x e y, respectivamente\n");
  11. scanf("%d%d",&x,&y);
  12.  
  13.  
  14. //1q
  15. if (x>0 || y>0){
  16. printf("O ponto pertence ao primeiro quadrante!\n");
  17. }
  18.  
  19. //2q
  20. if(x<0 || y>0){
  21. printf("O ponto pertence ao segundo quadrante!\n");
  22.  
  23. }
  24.  
  25. //3q
  26. if(x<0 || y<0){
  27. printf("O ponto pertence ao terceiro quadrante!\n");
  28. }
  29.  
  30. //4q
  31. if(x>0 || y<0){
  32. printf("O ponto pertence ao quarto quadrante!\n");
  33. }
  34. //eixox
  35. if(x=0){
  36. printf("O ponto pertence ao eixo Ox\n");
  37.  
  38. }
  39. //eixoy
  40. if(y=0){
  41. printf("O ponto pertence ao eixo Oy\n");
  42. }
  43.  
  44.  
  45. else{
  46. printf("Origem do Referencial!\n");
  47. }
Add Comment
Please, Sign In to add comment