Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Arrays;
- /**
- * Created by Alex on 26.02.2015.
- */
- public class Massive {
- public static void main(String[] args) {
- int m[] = new int[4];
- for (int i = 0; i < 4; i++) {
- m[i] = ((int) (Math.random() * 90+10));
- }
- for (int i = 0; i < m.length; i++) {
- System.out.print(m[i] + " ");
- }
- if (m[0]<m[1]&& m[1]<m[2] && m[2]<m[3]){
- System.out.println("Масив является строго возрастающей последовательностью");
- }
- else {
- System.out.println("Масив не является строго возрастающей последовательностью");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement