Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Intuit // C# // listing_4.2 (Converting / Parsing)
//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!"); Console.WriteLine("Enter the string"); string s = Console.ReadLine(); Console.WriteLine("s= " + s); Console.WriteLine("Enter the char"); char c = (char)Console.Read(); Console.ReadLine(); Console.WriteLine("c= " + c); string buf; Console.WriteLine("Enter the integer"); //целое число buf = Console.ReadLine(); int i = Convert.ToInt32(buf); //конвертер Console.WriteLine(" (converting)\ni= " + i); Console.WriteLine("Enter the double#0"); //введите вещественное число #0 buf = Console.ReadLine(); double d = Convert.ToDouble(buf); //конвертер Console.WriteLine(" (converting)\nd= " + d); Console.WriteLine("Enter the double#1"); //введите вещественное число #1 buf = Console.ReadLine(); double y = Double.Parse(buf); //парсер Console.WriteLine(" (parsing)\ny= " + y); Console.WriteLine("Enter the decimal number"); buf = Console.ReadLine(); decimal z = decimal.Parse(buf); Console.WriteLine(" (parsing)\nz= " + z); //парсер } } }
run
|
edit
|
history
|
help
0
asdfghyjuytt4wed
scanf1
asdfghjiu
1 to 1000 armstrong
TuplaDivWriteHexa
Hareket
C# - out parameters and reference parameters
ConvertDataTableToHTML
.,.
gfrsdfdfvgh