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 |
How many processes can listen on a single TCP/IP port?
in IT trend mantis meant what? how to know mantis in IT trends? detail description about mantis?
0 Answers Sacred Heart College,
what are the difference between C,C++and Java
what is difference between input parameter and output parameter.
While joining files if only two files are mentioned with jfile keyword, do we required to use join keyword????
i want to open a helkp file that is txt file on link buttons click
What are events in smartforms?
What sysoption determines where the macro facility searches a specific catalog for complied macro?
Write a program to calculate the following i want a Java program for this condition 1+4+9+16+….+100 Like this (1^2+2^2) Hint use function pow(a,b)
Compare any 4 software development life cycle paradigms with each other. Indicate at least one application for each of the paradigms that are suitable to developed using that paradigm.
this question is from sas:what is the difference between FILE and INFILE statements? plz explain in brief?
DIFFERENCE BETWEEN BINDING LANG AND BIND DIR WHEN USING IN SERVICE PGM