Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- bool done = false;
- int buf1 = 0;
- int buf2 = 0;
- int buf3 = 0;
- int buf4 = 0;
- while (!done)
- {
- int input = int.Parse(Console.ReadLine().Trim());
- if ((buf1 + buf2 + buf3 + buf4) == 13)
- done = true;
- else
- {
- buf1 = buf2;
- buf2 = buf3;
- buf3 = buf4;
- buf4 = input;
- }
- }
- Console.WriteLine("Thirteen!");
- }
Add Comment
Please, Sign In to add comment