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;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Random rnd = new Random();
- double a = rnd.Next(-10, 10), b = rnd.Next(-10, 10), c = rnd.Next(-10, 10), d = rnd.Next(-10, 10);
- Point n = new Point(a, b);
- Point n = new Point(c, d);
- }
- }
- }
- class Point
- {
- private double x;
- private double y;
- public Point(double x, double y)
- {
- this.x = x;
- this.y = y;
- }
- public void SetCord(double x , double y)
- {
- this.x = x;
- this.y = y;
- }
- public string GetCord()
- {
- return "x = " + this.x + "y = " + this.y;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement