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
how to display xisheet in list box in c# .net
what is c sharp dotnet
What is the difference between CLEAR & RESET and OPEN & CLOSE OPCOEDS(USING RPG/400).wheare we can use this?can any body tell me in real time senario with example please?
How to know we are in home page of a web application using QTP
What is diffrent between Method and and function in c#
What for decision coverage and modified condition decision coverage are used? Wat is the difference between them?
1.Mutating table
what is d main diff between the java and .net framework
I want to insert date in the form of yyyy-mm-dd... if any changes happen while inserting date format want to show error meg...any one can solve this..??
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box. eg: 3 box contain stick as:1,1,1. if u take 1 stick from 3rd numbred box you will any how win the match.
Explain polymorphism. Provide an example.
For a binary tree with n nodes, How many nodes are there which has got both a parent and a child?
1) How can u create the table?
purpose of abstraction and interface
how to work search engine? plz detail answer me.