Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
5555555
//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; using System.IO; namespace Rextester { public class Program { //Functions public static double Left(double R, double x, ref double y) { y = R - Math.Sqrt(-(x*x) - 2*x*R); //Console.WriteLine("L_y= " + y); return y; } public static double Right(double R, double x, ref double y) { y = -R + Math.Sqrt(-(x*x) + 2*x*R); Console.WriteLine("R_y= " + y); return y; } public static void Main(string[] args) { //Your code goes here //Console.WriteLine("Hello, world!"); Console.WriteLine("LABA2_ZAD2"); //arguments double x=0,y=0, R=1; double a=0, b = 0; //выстрел снайпера (x:y) char L_R; //execution Console.WriteLine("enter R"); R = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("enter x"); a = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("enter y"); b = Convert.ToDouble(Console.ReadLine()); x=R; y=R; Console.WriteLine("R={0,3}; a={1,3}; b={2,3}", R,a,b); Console.WriteLine("R={0,3}; x={1,3}; y={2,3}", R,x,y); //Left(R,x,ref y); //Right(R,x,ref y); /* switch (L_R) { case 'L' : if (R> Math.Sqrt(a*a+b*b)) default : break; } */ if (a<0 && b>-R && b<Left(R,a,ref b)) {Console.WriteLine("left"); Console.WriteLine("L_y= " + y);}//{L_R = 'L';} else {L_R='R';} if (Math.Abs(a)>R && Math.Abs(b)>R ) {Console.WriteLine("MIMO");} } } }
run
|
edit
|
history
|
help
0
Fibonacci with Given Length
6
sdgdfhfh
== and Equals Differeance in C#
Live tv 2021
Happy
wyliczenie 1 dnia tygodnia
string + null
Find the missing number in an array2
azs dasx