0

How to fix this?!!

The program you are given defines an array with 10 words and takes a letter as input. Write a program to iterate through the array and output words containing the taken letter. If there is no such word, the program should output "No match". Sample Input u Sample Output fun static void Main(string[] args) { string[] words = { "home", "programming", "victory", "C#", "football", "sport", "book", "learn", "dream", "fun" }; string letter = Console.ReadLine(); int count = 0; //your code goes here for(; count=words.Index; count++) { if words.Contains("letter")=words[count] Console.WriteLine(words[count]); } }

28th Aug 2022, 6:46 PM
TheMasterBee
TheMasterBee - avatar
2 Answers
+ 2
You haven't written the if statement correctly. Fix that first and then see what you get.
29th Aug 2022, 7:54 AM
Ausgrindtube
Ausgrindtube - avatar
+ 2
29th Aug 2022, 10:07 AM
AÍąJ
AÍąJ - avatar