Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Intuit // C# // listing_4.4 (StreamReader // input.txt)
//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; using System.IO; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here //Console.WriteLine("Hello, world!"); StreamReader f = new StreamReader("c:\\temp\\input.txt"); string s = f.ReadLine(); Console.WriteLine("s= " + s); char c = (char)f.Read(); f.ReadLine(); Console.WriteLine("c= " + c); string buf; buf = f.ReadLine(); int i = Convert.ToInt32(buf); Console.WriteLine("i= " + i); buf = f.ReadLine(); double x = Convert.ToDouble(buf); Console.WriteLine("x= " + x); buf = f.ReadLine(); double y = double.Parse(buf); Console.WriteLine("y= " + y); buf = f.ReadLine(); decimal z = decimal.Parse(buf); Console.WriteLine("z= " + z); } } }
run
|
edit
|
history
|
help
0
30272 Program Ex3
Hallo world
a5
Dependencia de datos
4.3 Static typing: benefits, drawbacks and ways to minimise them
C# first code
aszasxsdf
Print the letter until the next number
hello
DAY !