Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
work_laba#2
//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 void Main(string[] args) { //Your code goes here //arguments Console.WriteLine("Laba#2; " + "график изменяняющейся функции"); double Xn = -12, Xk = 12, dX = (Xk-Xn)/30; double x = -6; double z = 5; //double a = -6; //double y = 0; double a=-6, b=0, R = 3; //double b = 0; // a - сдвиг по абсцисе, b - сдвиг по ординате. /* double y1 = -Math.Sqrt(R*R - (x-a)*(x-a)) - b; //Math.Sqrt(R*R - (x-a)*(x-a) + b); // a = -6; b = 0; y<0; double y2 = x + 3; //ax+b; a = 1; b = 3; double y3 = Math.Sqrt(R*R - (x-a)*(x-a)) + b; // a = 0; b = 0; y>0; double y4 = -x + 3; //ax+b; a = -1; b = 3; double y5 = 0.5*x - 1.5;//ax+b; a = 0.5; b = -1.5; double y6 = 0; */ //execute for (int i=0; i<=30; i++) { x = x+0.1; Circle(a,b,R,x,ref z); Console.WriteLine("z= " + z); } } //FN public static double Circle(double a, double b, double R, double x, ref double z) { z = Math.Sqrt(R*R - (x-a)*(x-a)) - b; return z; } } }
run
|
edit
|
history
|
help
0
code
train555555
Non-User input - Random Controlled - Guessing Game
Dotnetq5
OOP vs DOD
Planet-D ver. 0.5
Prsonal informashin
integers
multiplicação
Tests