Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Intuit // C# // Lecture_4 // Laba_#1
//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 double Xn = -2, Xk = 8, dX = 1, t=2, y; Console.WriteLine("|__x__|__y__|");//заголовок таблицы for (double x = Xn; x <= Xk; x+=dX) { y=t; if (x>=0 && x<10) y = t*x; if (x>=10) y = 2*t; Console.WriteLine("|{0,5}|{1,5}|",x, y); } for (int i = 0; i<13; ++i) { Console.Write("="); } Console.WriteLine(); //laba_#1.1 Xn = -10; Xk = 10; double a = 0, z = 0; Console.WriteLine("\nLaba_#1.1; " + @"z = 2*Math.Pow(Math.Sin(3*Math.PI - 2*x),2) * Math.Pow(Math.Cos(5*Math.PI + 2*x),2);"); Console.WriteLine("|__x__|__________z_________|"); for (double x = Xn; x<=Xk; x+=dX) { z = 2*Math.Pow(Math.Sin(3*Math.PI - 2*x),2)*Math.Pow(Math.Cos(5*Math.PI + 2*x),2); Console.WriteLine("|{0,5}|{1,20}|",x,z); } //Laba_№1.2 Xn = -10; Xk = 10; a = 10; z = 0; Console.WriteLine("\nLaba_#1.2; " + @"z = x/14-(Math.Sin(5/2*Math.PI - 8*a))/4;"); Console.WriteLine("|__x__|__________y_________|"); for(double x = Xn; x <= Xk; x+=dX) { z = x/14-(Math.Sin(5/2*Math.PI - 8*a))/4; Console.WriteLine("|{0,5}|{1,20}|",x,z); } } } }
run
|
edit
|
history
|
help
0
abebe
Output to get sum = 5 in given array of integers
SHA加密
Shalini_CSG_CodeTest
Metodos y como llmarlos
s
JAVA HELLO
Byte array to base 64 string
3
aaa