Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static bool correct;
- static int numb;
- static void Main(string[] args)
- {
- int n = Int32.Parse(Console.ReadLine());
- for (int i = 0; i < n; i++)
- {
- int input = Convert.ToInt32(Console.ReadLine());
- if (i == 0)
- numb = input;
- if ((numb >= 0 && input >= 0) || (numb < 0 && input < 0))
- correct = true;
- else
- correct = false;
- input = 0;
- }
- Console.Write(correct ? "Correct" : "Incorrect");
- Console.ReadLine();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement