Advertisement
coasterka

#5MultiplicationSign

Mar 28th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2.  
  3. class MultiplicationSign
  4. {
  5.     static void Main()
  6.     {
  7.         Console.WriteLine("Enter first number.");
  8.         double a = double.Parse(Console.ReadLine());
  9.         Console.WriteLine("Enter second number.");
  10.         double b = double.Parse(Console.ReadLine());
  11.         Console.WriteLine("Enter third number.");
  12.         double c = double.Parse(Console.ReadLine());
  13.         double result = a * b * c;
  14.         if (result < 0)
  15.         {
  16.             Console.WriteLine("The multiplication sign of the three numbers is: -");
  17.         }
  18.         else if (result == 0)
  19.         {
  20.             Console.WriteLine("The multiplication result is: 0");
  21.         }
  22.         else
  23.         {
  24.             Console.WriteLine("The multiplication sign of the three numbers is: +");
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement