Guest User

Untitled

a guest
Oct 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. static void Main(string[] args)
  2. {
  3. bool done = false;
  4.  
  5. int buf1 = 0;
  6. int buf2 = 0;
  7. int buf3 = 0;
  8. int buf4 = 0;
  9.  
  10. while (!done)
  11. {
  12. int input = int.Parse(Console.ReadLine().Trim());
  13. if ((buf1 + buf2 + buf3 + buf4) == 13)
  14. done = true;
  15. else
  16. {
  17. buf1 = buf2;
  18. buf2 = buf3;
  19. buf3 = buf4;
  20. buf4 = input;
  21. }
  22. }
  23.  
  24. Console.WriteLine("Thirteen!");
  25. }
Add Comment
Please, Sign In to add comment