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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

public static void main(String args[]) describe it

2101


Display names and numbers of employees who have 5 years or more experience and  salary less than Rs.15000 using array of structures (name, number, experience and  salary)

4742


What is dialog programming?

2040


How do you pass variables forwrd to future CECI sessions

4507


how to hide prompts

1876


hi i m deepak my shedule for NIC pi is 17 Apr please contact me if anybody has interview on same day or give me some idea who have faced

2029


Is the IT field raise again? What is the position of IT after 4 years?

2195


how pseudo column works?

2191


write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?

2627


can u send some model papers how computer awareness questions are asked in goverment jobs(oriental insurance)to my mail id me.priyankapadma@rediff.com

2402


Is buffer size and file block size is similar? If similar,at which case it will be same size?

2176


< DL Compact > tag is used for

1950


What is autocall macro and how to create autocall macro? what is the use of it?

2045


Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe

1866


3. What is the difference between testing and Quality Assurance?

2012