Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Application
- {
- class MainClass
- {
- public static void Main (string[] args)
- {
- Random rand = new Random ();
- int n = rand.Next (15);
- int[] array = new int[n];
- int min = 0;
- for (int i = 0; i < n; i++) {
- array [i] = rand.Next (100) - 50;
- if (array [i] >= 0 && min < array [i])
- min = array [i];
- }
- foreach (int x in array)
- Console.Write (x + " ");
- Console.WriteLine ();
- Console.WriteLine (min);
- Console.Read ();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement