Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class MyProgram
- {
- private static Random random = new Random();
- public static void Main(string[] args)
- {
- int i, p, a;
- p = 0;
- for (i = 1; i <= 20; i++)
- {
- a = random.Next(101) - 50;
- Console.Write(Convert.ToString(a) + " ");
- if (Math.Abs(a) % 2 == 0)
- {
- p = p + 1;
- }
- }
- Console.WriteLine("\npรกrosok szรกma: " + p);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement