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
Given an array of size n, containing every element from 1 to n+1, except one. Find the missing element.
What is the use of sas software? Is sas and sap are different?
how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out
How can recruiter justified that the candidate is expert in Algorithm and datastructure for Software product development ?
In JCl , we have COND parameter.This holds comparison code and condition.It also has only and even parameters. ex: COND((4,GE),EVEN).what the comma mean here. is that 'and' or 'or'.
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?
Given a cube of size n*n*n (i.e made up of n^3 smaller cubes), find the number of smaller cubes on the surface. Extend this to k-dimension.
Please describe an example where you used object orientation in one of your programs.
diffrence between oracle apps , .NET , SAP
iam confused to choose among testing, .net and java can anybody help me????????
is it acceptable if we declare multiple exceptions in same overridden method.
what will we require to build project with the help of oracle
In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?
WHAT IS THE MEANING OF CONSTANT ...EXEEDS LENGTH LIMIT WHILE COPYING FROM PS FILE TO KSDS
what is the purpose of checked Menu options