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 a program to print all the prime numbers with in the
given range

Answer Posted / om

void find_primenumber_in_range(int r1,int r2)
{
int i,j;
for(i=r1;i<=r2;i++)
{
for(j=2; j<=(i/2); j++)
if(i%j==0)
break;
if(j== (i/2 +1))
printf("%d\t",i);
}
}

Is This Answer Correct ?    31 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should I declare a function?

1055


Where are local variables stored in c?

982


Do character constants represent numerical values?

1286


Write a program to print "hello world" without using a semicolon?

1004


What does typeof return in c?

1019


Write a program to print “hello world” without using semicolon?

1077


c program to compute AREA under integral

2336


I came across some code that puts a (void) cast before each call to printf. Why?

1154


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

2039


What is the difference between break and continue?

1397


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1046


What is the newline escape sequence?

1020


Which function in C can be used to append a string to another string?

1177


What are the different data types in C?

1146


What is the significance of scope resolution operator?

1347