Advertisement
bullit3189

Multiplication Sign - Methods

Feb 17th, 2019
872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _05MultiplicationSign
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double num1 = double.Parse(Console.ReadLine());
  10. double num2 = double.Parse(Console.ReadLine());
  11. double num3 = double.Parse(Console.ReadLine());
  12.  
  13. ResultSign(num1, num2, num3);
  14. }
  15.  
  16. public static void ResultSign (double n1, double n2, double n3)
  17. {
  18. if (n1==0 || n2==0 || n3==0)
  19. {
  20. Console.WriteLine("zero");
  21. }
  22.  
  23. else if ((n1>0 && n2>0 && n3>0) || (n1<0 && n2<0 && n3>0) || (n1<0 && n2>0 && n3<0) || (n1>0 && n2<0 && n3<0))
  24. {
  25. Console.WriteLine("positive");
  26. }
  27. else
  28. {
  29. Console.WriteLine("negative");
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement