Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
linked list (add to end and beginning, and looking for cycles based on Floyd's algorithm)
Square Integer Matrix
octalofint
Convert String to Pig Latin
Generics
Linked Lists
Function Tester
sortowania przez wstawienie Correct
two words are anagrams
see all nodes in given ldap node
stackse - search stackoverflow differently
Please log in to post a comment.