Advertisement
Guest User

Problem 4

a guest
Dec 13th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace task_4
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Please write a: ");
  14.             int a = int.Parse(Console.ReadLine());
  15.             Console.WriteLine("Please write b: ");
  16.             int b = int.Parse(Console.ReadLine());
  17.             Console.WriteLine("Please write c: ");
  18.             int c = int.Parse(Console.ReadLine());
  19.             int result = a * b * c;
  20.             if (result == 0) Console.WriteLine("0");
  21.             if (result > 0) Console.WriteLine("+");
  22.             if (result < 0) Console.WriteLine("-");
  23.  
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement