Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Laba_1_1 {
  3. public static void main(String args[]){
  4. System.out.println("Введте значение x , y ");
  5.  
  6. Scanner num_x= new Scanner(System.in);
  7. float x = num_x.nextFloat();
  8. Scanner num_y= new Scanner(System.in);
  9. float y = num_y.nextFloat();
  10. if(x>0 && x<2 && y<(-1/2)*x+1 && y>0) {
  11. System.out.println ("Принадлежит");
  12. }
  13. else{
  14. System.out.println(" Не ринадлежит");
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement