Advertisement
Guest User

Untitled

a guest
Oct 1st, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. for (int i = 0; i<mas.length; i++){
  2. Random ran = new Random();
  3. mas[i] = ran.nextInt(90)+10;
  4. System.out.print(mas[i]+ " ");
  5. }
  6. System.out.println(" ");
  7. if (mas[0] < mas[1]& mas[1]<mas[2]&mas[2]<mas[3]) {
  8. System.out.println("Последовательность строго возрастающая");
  9. }
  10. else if (mas[0] > mas[1]& mas[1]>mas[2]&mas[2]>mas[3]){
  11. System.out.println("Последовательность строго убывающая");
  12. }
  13. else
  14. System.out.println("Другая последовательность");
  15. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement