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 |
Diff.b/w Frames and container?
1 Answers Tech Mahindra, Wipro,
1.what is the vesition managment.
how to swap all the values without using temporary variable. tha values r a = 20, x=60 and p=2.
5 Answers DST Global Solutions, iGate,
Need provab technical test questions
which worker is involved in all the phases of SDLC?
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
Binary tree?
What is Console Application? & The purpose Of Console Application? with description.
what is best way to create a Thread class & why?
Explain with examples any 2 features of OOPS.
0 Answers Tavant Technologies, Verifone,
Why data bus is bidirectional and address bus is unidirectional?
List and explain any five built in functions for Lists data type in python