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

#include<stdio.h>
#include<conio.h>

void main()
{
int number,i;
clrscr();

for(i=1;i<=100;i++)
{
if(i%2==0)
{
printf("\n\n not prime number\t%d",i);
}
else

printf("\n\n prime number\t%d",i);
}
getch();
}

Is This Answer Correct ?    31 Yes 86 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

code for find determinent of amatrix

1917


Is r written in c?

1110


How do I determine whether a character is numeric, alphabetic, and so on?

1070


An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

1089


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

1003


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1209


What is wrong in this statement?

1080


What are the advantages and disadvantages of pointers?

1012


Difference between malloc() and calloc() function?

1130


Is there a way to switch on strings?

1027


What was noalias and what ever happened to it?

979


What is string function in c?

946


What is an example of structure?

981


Can include files be nested?

1058


Explain what are multidimensional arrays?

1009