Skip to content

Instantly share code, notes, and snippets.

@zaitcev
Created January 19, 2022 22:16
Show Gist options
  • Save zaitcev/a3ae3c0c7ce2d60d30ddc4c1837c24fe to your computer and use it in GitHub Desktop.
Save zaitcev/a3ae3c0c7ce2d60d30ddc4c1837c24fe to your computer and use it in GitHub Desktop.
// 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