Advertisement
rosenrusev

Multiplication Sign

Mar 21st, 2014
1,893
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. using System;
  2.  
  3. namespace MultiplicationSign
  4. {
  5. class MultiplicationSign
  6. {
  7. static void Main()
  8. {
  9. double a = double.Parse(Console.ReadLine());
  10. double b = double.Parse(Console.ReadLine());
  11. double c = double.Parse(Console.ReadLine());
  12.  
  13. if (a < 0)
  14. {
  15. if (b < 0)
  16. {
  17. if (c < 0)
  18. {
  19. Console.WriteLine("-");
  20. }
  21. else
  22. {
  23. Console.WriteLine("+");
  24. }
  25. }
  26. else
  27. {
  28. if (c < 0)
  29. {
  30. Console.WriteLine("-");
  31. }
  32. else
  33. {
  34. Console.WriteLine("+");
  35. }
  36. }
  37. }
  38. else if (a > 0)
  39. {
  40. if (b < 0)
  41. {
  42. if (c < 0)
  43. {
  44. Console.WriteLine("+");
  45. }
  46. else
  47. {
  48. Console.WriteLine("-");
  49. }
  50. }
  51. else
  52. {
  53. if (c < 0)
  54. {
  55. Console.WriteLine("-");
  56. }
  57. else
  58. {
  59. Console.WriteLine("+");
  60. }
  61. }
  62. }
  63. else if ((a == 0) || (b == 0) || (c == 0))
  64. {
  65. Console.WriteLine("0");
  66. }
  67. }
  68. }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement