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 dispaly upto 100 prime numbers(without
using Arrays,Pointer)

Answer Posted / sathya

#include<iostream.h>
void main()
{
int n,a;
cout<<"enter the limit";
cin>>n;
for(i=1;i<=n;i++}
{
if(i=1)
{
cout<<"1 is neither a prime nor a composite no";
}
else if(i%1==0|i%i==0)
{
cout<<i<<"is a prime number";
}
}
}

Is This Answer Correct ?    63 Yes 165 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you think of a logic behind the game minesweeper.

2463


What are the preprocessor categories?

1057


Which header file is used for clrscr?

1051


Why c is called procedure oriented language?

1040


hi, which software companys will take,if d candidate's % is jst 55%?

2091


Explain how can a program be made to print the name of a source file where an error occurs?

1197


Explain what is the most efficient way to store flag values?

1228


What are the 5 organizational structures?

1025


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

1073


what is a function method?give example?

2361


What is a floating point in c?

1071


Where are some collections of useful code fragments and examples?

1158


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

1231


What is the difference between ++a and a++?

1205


What is array in C

1153