TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prime b
NA
810
345.8k
Word manipulation
Jan 5 2012 12:16 AM
Write a console-based program that asks a user for a business
name. Suggest a good Web address by adding "www."
to the front of the name, removing all spaces from the name,
and adding ".com" to the end of the name. For example,
a good Web address for "Acme Plumbing and Supply"
is www.AcmePlumbingandSupply.com
My question: why I can only type 1 character? If I type two letters than the program gives me an error... Also how can i remove spaces from the text user enters?
What I have done:
string userInputString;
char userInput;
string www = "www";
string com = ".com";
Console.WriteLine("Please enter your business name");
userInputString = Console.ReadLine();
userInput = Convert.ToChar(userInputString);
Console.WriteLine(www + userInput + com);
Reply
Answers (
3
)
Another loop !
How to create simple mobile application with Example using Visual Studio 2005