Added exercices
This commit is contained in:
1 parent
eed3373822
commit
e8ccd877a0
3 files changed
+69
-16
No files matched your search
+6
-16
@@ -2,25 +2,15 @@
|
||||
namespace Algorithms;
|
||||
using System;
|
||||
|
||||
class Point{
|
||||
|
||||
private double x;
|
||||
private double y;
|
||||
|
||||
public Point(double x, double y){
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public double Distance(){
|
||||
return Math.Sqrt(x * x + x * y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Foo{
|
||||
class EntryPoint{
|
||||
|
||||
|
||||
public static void Main(String[] args){
|
||||
Point p = new Point(3, 4);
|
||||
Point point1 = new Point(3, 4);
|
||||
Point point2 = new Point(-3, -4);
|
||||
|
||||
Console.WriteLine("Hello World From A Class: " + p.Distance());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user