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

void prime(int a,int b)
{
int i,j,c
for(i=a;i<=b;i++)
{
c=0;
for(j=1;j<=a;j++)
{
if(a%j==0)
{
c++;
}
}
if(c==2)
printf(i);
}
}

Is This Answer Correct ?    8 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you know about the use of bit field?

1100


Explain what does the format %10.2 mean when included in a printf statement?

1414


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

1267


Can true be a variable name in c?

1090


Create a simple code fragment that will swap the values of two variables num1 and num2.

1329


Explain what is output redirection?

1250


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

6402


What is the best style for code layout in c?

1148


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2827


What is this infamous null pointer, anyway?

1106


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2386


What is the use of clrscr?

1159


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2234


What are the application of void data type in c?

1238


How do you construct an increment statement or decrement statement in C?

1277