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...


WAP to print all prime nos between 1 to 100 without using user
input...pls reply within few hours...



WAP to print all prime nos between 1 to 100 without using user input...pls reply within few hours...

Answer / ashwek

/// Using C++

#include<iostream.h>
#include<conio.h>

int main(){

int temp;

cout<<" Prime number between 1 to 100 : ";
for(int i=2; i<=100; i++){
temp=0;
for(int j=2; j<i; j++){
if(i%j==0) temp = 1;
}

if(temp==0) cout<<i <<", ";
}
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

how to display xisheet in list box in c# .net

0 Answers  


What is a programming language?

1 Answers  


2. What do you mean by DHCP?

1 Answers  


Hi Friends , i am very new in VB 6.0 Any body can able to help me ? i need interview question and answer vb 6.0 . please send honeysukumar@yhaoo.com

2 Answers  


What are the advantages of Server Controls over HTML/ASP Controls.

1 Answers   Tesco,


What are events in smartforms?

0 Answers   Accenture,


what is the abap/4

1 Answers  


MOV.CB 007H,ADCON1 MOVE.CT 001H,_OPTION_REG_7 MOV.CB 007H,CMCON

0 Answers  


What is dialog programming?

0 Answers  


why we use abstract word in abstract window toolkit in java language.

0 Answers   Infosys,


what are the difference between C,C++and Java

1 Answers   Wipro,


Which language they use during interview?

0 Answers   State Bank Of India SBI,


Categories