Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. int a, brojac = 0;
  2. try
  3. {
  4. do
  5. {
  6. Console.WriteLine("Unesite broj: ");
  7. a = int.Parse(Console.ReadLine());
  8. if (a % 2 == 0)
  9. brojac++;
  10. else
  11. brojac = 0;
  12. }
  13. while (brojac < 2);
  14. }
  15. catch (Exception e)
  16. {
  17. Console.WriteLine("Doslo je do greske: " + e.Message);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement