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

in IBM PC -AT.WAT AT REFERS TO?

1962


Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik

2410


is it possible to desable particular parameter of the normal orcle report based on some condition ?????? if yes,wht is the function for desabling a parameter...

2124


How to print No.of.rows affected after updation using ADO.Net

2921


When we delete logfiles such as screenshots how does it affect the ldf file? Ive seen huge change while adding screenshots in the ldf file but a very minor one deleting them.Please Explain

1972


shall we execute our java programmes in jre

2350


how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out

1967


Hey this is venkatesh.Please can any body tell me what is SFLNXTCHG?where we use this keyword?what perpuse we use this?Can you tell me in real time senario with example? And in 7 specification(RPG/400)what is the mandatory specification using programs?

2167


Write a program to find factorial of a number using functions

1759


When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)

1238


I am looking for NIC Sample papers or any patern of questions/ syllabus plz, send me on hamid.khan135@yahoo.in Regard

2024


I am taking the bmc control m/enterprise manager 7.0 scheduling test and just wanted to see what kind of questions they would ask or if anyone has taken the test and how long it is for how many questions?

6176


What sysoption determines where the macro facility searches a specific catalog for complied macro?

2180


What is the use of sas software? Is sas and sap are different?

1576


1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END

2881