© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
37 replies
j7nooah

I am new to c# and need help

Need Help ( I am new to c#)
This is my task :

Write a C# program that prompts the user for input in the following format
enter the console: "word-word-number". “Word” stands for words and “number” stands for one
numerical number. Each part is separated from each other by the separator "-". The program should
Make sure the input consists of exactly two words and a number. If the input is the
If the criterion is not met, the program should return with the error message "Error: The input must be from e»
2 words and 1 number”. Note that you do not need to do this task
Using the split method should be used and that the str. dealt with in school
Methods are sufficient to solve the task.

Valid entries:
* Hello World 20th
* I-Am-500

Invalid entries
Hello World 20-20
I-20 world
Hello
Screenshot_2023-11-15_100158.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ new to c# need help making new methods
C#CC# / help
3y ago
Help new to c# and need explanation with substring
C#CC# / help
16mo ago
✅need help!! (very very new to c#)
C#CC# / help
3y ago
I am new to C# (for unity)
C#CC# / help
3y ago