Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
pointoncircle
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static int pow (int b , int p ) { int e = 1; for (int i=1;i<=p;i++) { e = e * b; } return e; } public static void Main(string[] args) { int x1=1;int y1 = 4;int r = 3; int x2=4; int y2 =4; double d = Math.Sqrt(pow((x2-x1),2) + pow((y2-y1),2)); Console.WriteLine("distance of points {0}", d); if (d < r) { Console.WriteLine("inside circle"); } if (d > r) { Console.WriteLine("outside circle"); } if (d == r ) { Console.WriteLine("on circle"); } } } }
run
|
edit
|
history
|
help
0
Main5.1
Fórum ➡ Calculate the Sum of Values in List of KeyValuePair<> objects ♦
RGEFCSZX
Main4-1
FindElementInAscendingSortedRotatedArray
New House Exam 11 April
Simple StackOverflowException
Random Integers
e
decimal to multiple binary