Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- String unos = "";
- int brojac = 0;
- int zbir = 0;
- int broj;
- while(unos != "1000")
- {
- unos = Console.ReadLine();
- try
- {
- broj = Int32.Parse(unos);
- if(broj != 1000 && broj % 2 == 0)
- {
- brojac++;
- zbir = zbir + broj;
- }
- }
- catch(Exception e){
- }
- }
- Console.WriteLine(zbir / brojac);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement