Advertisement
RAUL-SUAREZ

Untitled

Aug 18th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.48 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class punto1 {
  4.  
  5.     public static void main(String[] args) {
  6.         Scanner coordenadas= new Scanner (System.in);
  7.         int x,y;
  8.        
  9.         System.out.println("introduzca la coordena para la abscisa en  x");
  10.         x=coordenadas.nextInt();
  11.        
  12.         System.out.println("introduzca la coordena para las ordenadas en  y");
  13.         y=coordenadas.nextInt();
  14.        
  15.         if (x==0 && y==0) {
  16.             System.out.println("se encuentra en el origen de coordenadas");
  17.            
  18.         }
  19.         else {
  20.             if(x>0 && y>0) {
  21.                 System.out.println("se encuentra en el 1° cuadrante");
  22.             }
  23.             else {
  24.                 if (x<0 && y>0) {
  25.                     System.out.println("se encuentra en el 2° cuadrante");
  26.                 }
  27.                 else {
  28.                     if (x<0 && y<0) {
  29.                         System.out.println("se encuentra en el 3° cuadrante");
  30.                     }
  31.                     else {
  32.                         if(x>0 && y<0) {
  33.                         System.out.println("se encuentra en el 4° cuadrante");
  34.                         }
  35.                         else {
  36.                             if(x>0 && y==0) {
  37.                                 System.out.println("se encuentra en el eje X de las abscisa positiva");
  38.                             }
  39.                             else {
  40.                                 if(x<0 && y==0) {
  41.                                     System.out.println("se encuentra en el eje X de las abscisa negativa");
  42.                                 }
  43.                                 else {
  44.                                     if(x==0 && y>0) {
  45.                                         System.out.println("se encuentra en el eje Y de las ordenas positiva");
  46.                                     }
  47.                                     else {
  48.                                         if(x==0 && y<0) {
  49.                                             System.out.println("se encuentra en el eje Y de las abscisa negativa");
  50.                                         }
  51.                                     }
  52.                                 }
  53.                             }
  54.                         }
  55.                     }
  56.                 }
  57.             }
  58.         }
  59.  
  60.     }
  61.  
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement