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 / paps

#include<stdio.h>
void main()
{
int a=1,i,j,b,n;
printf("enter the range\n");
scanf("%d",&n);
printf("prime number series between 1 to %d:n");
printf("%d",a);
while(i<=n)
{
for(j=2;j<i;j++)
{
b=i%j;
if(b==0)
break;
}
if(i==j)
printf("%d",i);
i++;
}
getch();
}

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between if else and switchstatement

2003


What is the difference between functions abs() and fabs()?

1207


What does the c in ctime mean?

1160


Where static variables are stored in memory in c?

1051


What is c programing language?

1134


What is c method?

1045


Write a program to print factorial of given number without using recursion?

1042


How are strings stored in c?

1079


What is 02d in c?

1111


Where does the name "C" come from, anyway?

1215


What is c language used for?

1026


in iso what are the common technological language?

2163


Is there a built-in function in C that can be used for sorting data?

1339


How does #define work?

1125


What is the code for 3 questions and answer check in VisualBasic.Net?

2208