Computer Science, asked by anannyadeb94, 11 months ago

wap to print and check nelson number​

Answers

Answered by Anonymous
5

Answer:

Java programming exercises and solution: Write a Java program to check whether a given number is a Disarium

Answered by Anonymous
2

A nelson number is a number with multiples of 111.

Program to print and check nelson number​ in c# is:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace nelson _no

{

class nelson

{    static void Main(string[] args)

   {

    Console.WriteLine ("Enter the number to check:");

    int check_nelson = int.Parse ( Console.ReadLine() );

    if (check_nelson == 111 || check_nelson == 222 || check_nelson == 333 ||    

    check_nelson == 444 || check_nelson == 555 || check_nelson == 666 ||  

     check_nelson == 777 || check_nelson == 888 || check_nelson == 999)

     Console.WriteLine ( " It is a nelson number " );

    else

    Console.WriteLine (" It is not a nelson number");

    }

 }  

}

Similar questions