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
346k
Twitter help ! :P
Dec 29 2011 7:02 PM
This is what I have to do
Write a console-based program that accepts a user's
message and determines whether it is short enough for
a social networking service that does not accept messages
of more than 140 characters. Save the program as
Twitter.cs.
This is what i have done
double maxLimit = 140;
double userInPut;
string stringUserInPut;
Console.WriteLine("Enter your message, but remember the text cannot exceed 140 characters");
stringUserInPut = Console.ReadLine();
userInPut = Convert.ToDouble(stringUserInPut);
if (userInPut > maxLimit)
Console.WriteLine(" The message is too long , sorry");
else
Console.WriteLine(" Your message is sent");
My questions are, how can I allow any characters to be typed in,such as numbers, symbols , etc, with double I can only do numbers and if I do letters it gives a me an error. also in the problem they ask me to " not accept the message if its over 140 characters" when in my version it shows message.
Reply
Answers (
7
)
API for Google Earth to plot points
C# back and forward buttons? Why dont they work?