Advertisement
Guest User

Untitled

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