Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int.TryParse(Console.ReadLine(), out int n);
- Random random = new Random();
- int[] a = new int[n];
- for (int i = 0; i < n; i++)
- {
- a[i] = random.Next(-100, 101);
- Console.Write(a[i]+"\t");
- }
- Console.WriteLine();
- for (int i = 0; i < n; i++)
- {
- a[i] = -a[i];
- Console.Write(a[i]+"\t");
- }
Advertisement
Add Comment
Please, Sign In to add comment