How can i write a code in c# to take a number from the user
and then find all the prime numbers till the number entered
by the user.

Answer Posted / anjali

while(num>0)
{
if(num%2==1)
printf("num is prime value");
}

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between inheritance and polymorphism?

585


Which language is not a true object oriented programming language?

640


Can destructor be overloaded?

593


write a programe to calculate the simple intrest and compund intrest using by function overlading

1666


Explain virtual inheritance?

680






What is interface in oop?

658


What are benefits of oop?

631


What is the use of oops?

617


What is inheritance in oop?

597


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

1652


What are two types of polymorphism?

607


What is static modifier?

630


What is the difference between procedural programming and oops?

550


What is inheritance in simple words?

623


What is data binding in oops?

582