Advertisement
Alex_Zuev

Untitled

Feb 26th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1. package com.company;
  2. import java.util.Arrays;
  3.  
  4. /**
  5.  * Created by Alex on 26.02.2015.
  6.  */
  7. public class Massive {
  8.  
  9.     public static void main(String[] args) {
  10.         int m[] = new int[4];
  11.  
  12.         for (int i = 0; i < 4; i++) {
  13.             m[i] = ((int) (Math.random() * 90+10));
  14.  
  15.         }
  16.         for (int i = 0; i < m.length; i++) {
  17.             System.out.print(m[i] + " ");
  18.         }
  19.         if (m[0]<m[1]&& m[1]<m[2] && m[2]<m[3]){
  20.             System.out.println("Масив является строго возрастающей последовательностью");
  21.         }
  22.         else {
  23.             System.out.println("Масив не является строго возрастающей последовательностью");
  24.         }
  25.  
  26.     }
  27.  
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement