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