Advertisement
Guest User

MultiplicationSign

a guest
Nov 13th, 2015
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2.     class MultiplicationSign
  3.     {
  4.         static void Main(string[] args)
  5.         {
  6.             double a = double.Parse(Console.ReadLine());
  7.             double b = double.Parse(Console.ReadLine());
  8.             double c = double.Parse(Console.ReadLine());
  9.  
  10.             if (a == 0 || b == 0 || c == 0)
  11.             {
  12.                 Console.WriteLine("0");
  13.             }
  14.             else
  15.             {
  16.                 if(a<0 ^ b<0 ^ c<0 )
  17.                 {
  18.                     Console.WriteLine("-");
  19.                 }
  20.                 else
  21.                 {
  22.                     Console.WriteLine("+");
  23.                 }
  24.             }
  25.         }
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement