Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _05._Multiplication_Sign
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int[] nums = new int[3];
- FillArry(nums);
- PrintResult(nums);
- }
- static void PrintResult(int[] nums)
- {
- if (nums.Any(x => x == 0))
- {
- Console.WriteLine("zero");
- return;
- }
- if (nums.Count(x => x < 0) % 2 == 1)
- {
- Console.WriteLine("negative");
- }
- else { Console.WriteLine("positive"); }
- }
- static void FillArry(int[] nums)
- {
- for (int i = 0; i < nums.Length; i++)
- {
- nums[i] = int.Parse(Console.ReadLine());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement