0

I have two arrays one is double array ,has the scores of words and other one is string array has the words.Like this

scores={23.25 ,5.2  , 1.5 , 13.00}
words={car, bag, cars, phone}

I would like to sum up values of car and cars and delete cars from words and its value from scores array and get these two arrays

scores={24.75 , 5.2 ,13.00 }
words={car, bag, phone}

Then scores array is going to be sorted that I can get TOP 2 words car and phone and pass them to textbox2

for (i=0;i<words.Length;i++){
for (j=i+1;j<words.Length;j++){
if (words.Contains(words[j])){
     delete words[j]//here i need help
      scores[i]+= scores[i]+scores[j]
}
}

Array.Sort(scores); //and here after sorting how can i get corresponding top 2 words
info perto
  • 89
  • 1
  • 1
  • 11

0 Answers0