Answer to Question #15130 in C# for sikha

Question #15130
write a programme to input a number and check it nelson or not
1
Expert's answer
2012-09-21T11:49:46-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nelson
{
class Program
{
& static void Main(string[] args)
& {
Console.WriteLine("Enter number");
int nelsonOrNo = int.Parse(Console.ReadLine());

if (nelsonOrNo == 111 || nelsonOrNo == 222 || nelsonOrNo == 333 || nelsonOrNo == 444 || nelsonOrNo == 555 || nelsonOrNo == 666 || nelsonOrNo == 777 || nelsonOrNo == 888 || nelsonOrNo == 999)
Console.WriteLine("It's& nelson number");
else Console.WriteLine("It isn't& nelson number");
& }
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS