+ 1
Can somebody help
Help with a code project pls
29 ответов
+ 4
What is the task?
What help do you need?
What have you tried?
+ 4
Lennart Lang ,
this not a chat app. you have posted (additional) 11 not meaningful comments, which makes the thread difficult to read.
please also include your attempt here, so that we can see what your issue exactly is.
+ 3
start with a loop over the string array.
+ 2
i would use a for loop. from 0 up to words.Length
+ 1
iterate over words.
for each word, check if string contains the substring (input).
output as instructed.
+ 1
then you should review the previous lesson contents before you do the task, right?
+ 1
Ok?
+ 1
For or while?
+ 1
For, right?
+ 1
Ok
+ 1
did you start with the for-loop?
link your code.
+ 1
i asked you yesterday to start with a for-loop. Link your code.
+ 1
inside the loop, get the word of the current iteration:
word[count].
use an if-statement, to check if the current word contains the "letter".
I would use the Contains() method of strings.
https://learn.microsoft.com/en-us/dotnet/api/system.string.contains?view=net-8.0
if the current word contains the letter, output as instructed.
0
using System;
using System.Collections.Generic;
namespace Code_Coach_Challenge
{
class Program
{
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
}
}
}
0
I have tried nothing bc I don't understand it
0
And I need to make it like the I input a Letter the program outputs every word with this letter
0
Or many letters as input
0
But I didn't really understand how to do it
0
Idk how
0
I didn't understand what I "learned"