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

What are the compilers of JAVA and .NET Programming languages?

1 Answers   HCL, Microsoft,


what is delimiter in sas ?

0 Answers  


Find out the list of roles which gives access to GUI activities? thanks in advance

0 Answers  


Is CTS company do serious backgroung check?

0 Answers   CTS,


Which CRM is better to opt, Sebiel CRM or Salesforce CRM or sap CRM? which institute is best one in hyderabad

0 Answers  


When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.

0 Answers   Tesco,


What Is The Difeerence Between C & C++

2 Answers   HCL,


When we use Windows authentication mode

0 Answers  


how do we provide security for web services

0 Answers  


what is the difference between a looping statement and a decision statement

4 Answers  


what is diff bet ref variable & instance of class

0 Answers  


swap two number wthout using third variable

4 Answers   eClerx,


Categories