Created
January 19, 2022 22:16
-
-
Save zaitcev/a3ae3c0c7ce2d60d30ddc4c1837c24fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// My first C# program - "Moon Lander" | |
using System; | |
using System.IO; // StreamReader | |
namespace lander | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
StreamReader inp; | |
StreamWriter outp; | |
string line; | |
inp = new StreamReader(Console.OpenStandardInput()); | |
outp = new StreamWriter(Console.OpenStandardOutput()); | |
outp.AutoFlush = true; | |
// Console.WriteLine("Lander"); | |
outp.WriteLine("Lander"); | |
while ((line = inp.ReadLine()) != null) { | |
outp.WriteLine(line); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment