Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void e13()
- {
- Random someRand = new Random();
- int s1, s2, count = 0;
- for (int i = 1; i <= 500; i++)
- {
- s1 = someRand.Next(6, 10);
- s2 = someRand.Next(6, 10);
- if ((s1 + s2) % 2 == 0)
- {
- count++;
- }
- }
- Console.WriteLine(count);
- }
- static void e16()
- {
- Console.WriteLine("Choose number");
- int num = int.Parse(Console.ReadLine());
- int multi = num % 10;
- while (num != 0)
- {
- num = num/ 10;
- if (num == 0)
- {
- break;
- }
- multi = multi * (num % 10);
- }
- Console.WriteLine(multi);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement