how do I make a program?
Hello, how do I make a program that outputs "Yes" or "No" depending on whether there are 3 words in the entered words that should output "Yes"?
10 Replies
I think this probably needs a bit more detail on what it is you're trying to do / what you've done so far
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
Condition
You have learned the recipe for a delicious cake: flour, sugar and milk. Every delicious cake should contain these three ingredients. You get 5 ingredients at the entrance, find out if the cake will be delicious or not.
The input data format
is 5 words – the names of the cake ingredients.
Output data format
The answer is YES if the cake is delicious, or NO if the cake is tasteless.
Cool, and what have you managed to do so far?
Not much
you can paste it here with $code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/you missed a ` at the very start to make it format correctly
So at the moment you'll be printing out YES only if all 5 inputs match the 3 required ingredients
You could put the ingredients in an array or list and then loop through them, and keep count of how many matches you get
If you're hoping someone's gonna do your homework for you, don't hope for that. Just gonna get it out of the way
If not, show us what code you have so far and what the issue is with it