Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2007, 11:08 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please help me to solve these two problem

plz help me to solve ths 2 question-
Q1:- Write a program which takes a string as input and give the position of all matching brackets as output.
E.g. input is “{{}{{}{}}{}}”

And output should be:

     Bracket on position 2 matches with brackets on position 3
     Bracket on position 5 matches with brackets on position 6
      Bracket on position 7 matches with brackets on position 8
      Bracket on position 10 matches with brackets on position 11

Q2:- A string can accept only a-z (all alphabets without repetition).Now a string is say, “REPEATABLE”. Now whenever it contains a repeated alphabet(E ,A in this case)then the second repeated letter should be deleted as well as the letter after it also should be deleted from the string. So the output will be “REPTABL”. Write a programme to give the output.


 
Old December 20th, 2007, 11:09 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Clerification**

I need the code in c#.Thanks

 
Old December 20th, 2007, 11:37 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

You wont find many people on here willing to do your homework for you.

To quote a fellow member on these forums:

"You might be lucky and find someone who's in the Christmas spirit, but my own approach on this list is that I'm happy to help people who have a specific question or a specific difficulty, but I don't provide a free programming service."

/- Sam Judson : Wrox Technical Editor -/
 
Old December 20th, 2007, 11:54 AM
Authorized User
 
Join Date: Nov 2006
Posts: 93
Thanks: 0
Thanked 1 Time in 1 Post
Default

You might try writing your problem out in psuedo code in whatever language you feel comfortable with. Sort of like:

Look at each of the characters in the string {
  If the character is an Open Bracket do ...

  Else do ...

}

From there you need to convert your psuedo code to C# code. Which is a big topic if you know nothing about C#. If you have specific questions about how to accomplish a task, ask and you may get an answer.

Happy Holidays

What you don't know can hurt you!
 
Old January 3rd, 2008, 08:41 AM
Authorized User
 
Join Date: Jul 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mujahidkhaleel
Default

Regular expressions with C# should help you here if you want to do it yourself. Sample can be found here http://www.c-sharpcorner.com/UploadF...RegExpPSD.aspx and regular expressions can be read here http://www.regular-expressions.info/

Good luck.

Mujahid Khaleel
Web designing, development, E-commerce applications.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help to solve problem PankajMishra XSLT 7 April 19th, 2007 08:27 AM
Will you please help me to solve this problem....? vis_kapadia Excel VBA 2 November 22nd, 2006 04:57 AM
Solve the problem chandan_tandon General .NET 0 October 4th, 2006 07:00 AM
Solve my problem first? wakil C# 3 February 9th, 2006 08:21 AM
could you solve my problem? Robin1 Javascript 0 September 13th, 2004 10:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.