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

How can I call fortran?

1055


How to draw the flowchart for structure programs?

9349


How can you determine the maximum value that a numeric variable can hold?

1243


Is c is a middle level language?

1078


What are the ways to a null pointer can use in c programming language?

1148


What are pointers? What are stacks and queues?

1162


What are c header files?

1002


What are types of preprocessor in c?

1083


What are the types of assignment statements?

1080


Give me the code of in-order recursive and non-recursive.

1380


What's the total generic pointer type?

1061


What are register variables in c?

1021


What is the difference between test design and test case design?

2104


Not all reserved words are written in lowercase. TRUE or FALSE?

1240


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1522