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
Guest User
Tech Writer
2.1k
474.8k
App accepts a number less than 5 and output the diff
Feb 14 2020 6:25 AM
Hi Team
I need your help i want to create a console app that accept 5 number and output the diff for that number. My challenge to this is test scenario for user input, please assist thanks. Below this what i have attempted to solve this, but it i must also find a way to create scenario for test cases and need some help please .
using
System;
public
class
Program
{
public
static
void
Main()
{
string[] seperators = {
","
,
" "
,
";"
,
"."
};
int
num2;
Console.WriteLine(
"Input numbers over 10:"
);
string[] splitArray = Console.ReadLine().Split(seperators, StringSplitOptions.RemoveEmptyEntries);
foreach (string num in splitArray)
{
if
(Int32.TryParse(num, out num2) ==
true
)
{
if
(num2 < 10)
{
Console.WriteLine(num +
" is smaller than 10"
);
}
}
else
{
Console.WriteLine(num +
" is not a f***ing number..."
);
}
}
}
}
Reply
Answers (
3
)
insert data using mvc with ef.
saving of notes to grid with label,Note and date and time