Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class MultiplicationSign
- {
- static void Main()
- {
- Console.Write("a = ");
- double a = double.Parse(Console.ReadLine());
- Console.Write("b = ");
- double b = double.Parse(Console.ReadLine());
- Console.Write("c = ");
- double c = double.Parse(Console.ReadLine());
- if (a == 0 || b == 0 || c == 0)
- {
- Console.WriteLine("0");
- }
- else if (a > 0 && b > 0 && c > 0)
- {
- Console.WriteLine("+");
- }
- else if (a < 0 && b < 0 && c < 0)
- {
- Console.WriteLine("-");
- }
- else if (a > 0 && b > 0 || a > 0 && c > 0 || b > 0 && c > 0)
- {
- Console.WriteLine("-");
- }
- else if (a < 0 && b < 0 || a < 0 && c < 0 || b < 0 && c < 0)
- {
- Console.WriteLine("+");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment