Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MultiplicationSign
- {
- class Program
- {
- static void Main(string[] args)
- {
- double n1 = double.Parse(Console.ReadLine());
- double n2 = double.Parse(Console.ReadLine());
- double n3 = double.Parse(Console.ReadLine());
- Console.WriteLine(ProductValue(n1, n2, n3));
- }
- static string ProductValue(double n1, double n2, double n3)
- {
- string result = "positive";
- if (n1 == 0 || n2 == 0 || n3 == 0)
- {
- result = "zero";
- }
- else if (n1 < 0 || n2 < 0 || n3 < 0)
- {
- if (!(n1 < 0 && n2 < 0 && n3 > 0 || n1 < 0 && n3 < 0 && n2 > 0 || n2 < 0 && n3 < 0 && n1 > 0))
- {
- result = "negative";
- }
- }
- return result;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement