Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
Intuit // C# // listing_4.10 (for..)
//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 |");//заголовок таблицы 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); } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Project Euler problem 1
Unsorted array with most occurence
linqs
Intuit // C# // listing_4.7 (case // calculator)
SunLocation
Exception handling2
Delegate test lambda
miner
Square Integer Matrix
w
Please log in to post a comment.