Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Balanced Parentheses_3*/
- Console.WriteLine(" try it me ");
- while (true)
- {
- Console.WriteLine(" try it agan ");
- char[] Text = Console.ReadLine().ToCharArray();
- string Pharentesis = (Text[0].Equals('(') && Text[1].Equals(')')) ? ":) yes" : ":( No";
- string Corchetes = (Text[0].Equals('[') && Text[1].Equals(']')) ? ":) yes" : ":( No";
- string Brackets = (Text[0].Equals('{') && Text[1].Equals('}')) ? ":) yes" : ":( No";
- Console.WriteLine("\n() "+ Pharentesis+"\n[] "+ Corchetes+"\n{} "+ Brackets+"\n");
- }
Add Comment
Please, Sign In to add comment