Home » Ask & Discuss » Board Exams - CBSE, ICSE, State Boards » Computer Science « Back to Discussion
Computer Science
Comments (3)
anchal singhal
Blazing goIITian

Joined: 21 Aug 2008
Posts: 380
8 Jun 2009 22:46:25 IST
Like
0 people liked this
i think it can be done as--first input the word then apply for loop for the string and apply condition if(string[i]==word)then count++;it will give the no. of times the word has occured
Reply
8 Jun 2009 22:53:48 IST
Like
0 people liked this
though it not completely correct but it gives me some idea..we need to start the loop of both variables word as well as string at same time.
My problem is I am making a list of organic reactions ...ok so I will ask the user to input the name of any one reactants and my program will give the possbile products so for that I will need to compare the input word many times and it needs to give output different too..counting was for general actually no need for my program










