Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Intuit // C# // listing_4.8 (while)
//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 //Console.WriteLine("Hello, world!"); double Xn = -2, Xk = 12, dX = 1, t=2, y; Console.WriteLine("| x | y |");//заголовок таблицы double x = Xn; while (x <= Xk) { y=t; if (x>=0 && x<10) y = t*x; if (x>=10) y = 2*t; Console.WriteLine("|{0,5}|{1,5}|",x, y); x +=dX; } } } }
run
|
edit
|
history
|
help
0
tax cal
Overloading Unary operator ~ (to reverse the string)
asxsdxsdf
Abstract Method Design Pattern in C#
q3 .net
Prime no for specified max no by user(Using While Loop)
switch it
nums y lists
Hi
anyonymous type pass to method in c#