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