v1ppers0nn

Multiplication Sign

Apr 10th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. class MultiplicationSign
  4. {
  5.     static void Main()
  6.     {
  7.         Console.Write("Write three numbers: ");
  8.         double a = double.Parse(Console.ReadLine());
  9.         double b = double.Parse(Console.ReadLine());
  10.         double c = double.Parse(Console.ReadLine());
  11.  
  12.         if ((a*b*c)>0)
  13.         {
  14.             Console.WriteLine("+");
  15.         }
  16.         else if (a==0 || b==0 || c==0)
  17.         {
  18.             Console.WriteLine("0");
  19.         }
  20.         else
  21.         {
  22.             Console.WriteLine("-");
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment