Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int a, brojac = 0;
- try
- {
- do
- {
- Console.WriteLine("Unesite broj: ");
- a = int.Parse(Console.ReadLine());
- if (a % 2 == 0)
- brojac++;
- else
- brojac = 0;
- }
- while (brojac < 2);
- }
- catch (Exception e)
- {
- Console.WriteLine("Doslo je do greske: " + e.Message);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement