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 the prime numbers from 1 to 100?

Answer Posted / deva

int main()
{
int i,j,count=0;

for(i=2;i<100;i++)
{

for( j=2;j<i;j++)
{
if(i%j==0)
count++;

}
if (count==0)
printf("%d\t",i);
count=0;
}

}

Is This Answer Correct ?    22 Yes 37 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of errors?

1123


What does *p++ do?

1009


why we wont use '&' sing in aceesing the string using scanf

2356


what is the different bitween abap and abap-hr?

2300


What are the scope of static variables?

1170


What is meant by high-order and low-order bytes?

1035


How main function is called in c?

1112


Are enumerations really portable?

1012


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

2160


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

1365


What is main () in c?

1053


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

2163


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

2449


What is a far pointer in c?

1032


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3953