Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write the program for prime numbers?

Answer Posted / pratibha

#include<stdio.h>
#include<conio.h>
void main()
{
int no,i,count=0;
clrscr();
printf("enter the no");
scanf("%d",&no);
for(i=1;i<=no;i++)
{
if(no%i==0)
{
count=count+1;
}
}
if(count<=2)
{
printf("this is prime no");
}
else
{
printf("this is not prime");
}
getch();
}

Is This Answer Correct ?    17 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2222


What is the use of ?

1083


Explain how can type-insensitive macros be created?

1043


What is the difference between array and pointer in c?

1223


Do variables need to be initialized?

1110


What is FIFO?

1840


How can I open a file so that other programs can update it at the same time?

1238


Is a house a shell structure?

1213


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1992


What is #line used for?

1072


what is the difference between class and unio?

2417


Why can’t constant values be used to define an array’s initial size?

1438


What are the different types of errors?

1206


write a program to create a sparse matrix using dynamic memory allocation.

4955


How can I make it pause before closing the program output window?

1080