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

What does %p mean c?

1018


What is the difference between call by value and call by reference in c?

1115


Is c procedural or functional?

981


What is pragma in c?

1133


How will you find a duplicate number in a array without negating the nos ?

2085


Explain about the functions strcat() and strcmp()?

992


what do you mean by enumeration constant?

960


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

1245


Does c have function or method?

945


In a header file whether functions are declared or defined?

1081


we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?

1209


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1016


Is there any demerits of using pointer?

1018


What are the 5 types of organizational structures?

1022


What is the full form of getch?

1186