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