Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace LangProgKT3
- {
- class Program
- {
- static void Main(string[] args)
- {
- var random = new Random();
- int m = 10;
- var array = new int[m, 2];
- var new_array = new int[m, 2];
- for (int i = 0; i < m; i++)
- {
- array[i, 0] = random.Next(-10, 10);//x
- array[i, 1] = random.Next(-10, 10);//y
- }
- for (int i = 0; i < m; i++)
- {
- Console.Write(array[i, 0] + " " + array[i, 1]);
- Console.WriteLine();
- }
- Console.WriteLine();
- for (int i = 0; i < m; i++)
- {
- new_array[i, 0] = -array[i, 0];
- new_array[i, 1] = array[i, 1];
- }
- for (int i = 0; i < m; i++)
- {
- Console.Write(new_array[i, 0] + " "+ new_array[i, 1] );
- Console.WriteLine();
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement