Code
#include <iostream>
using namespace std;
int main(){
int i=2, j, is_prime;
// we set i = 2 because prime numbers start at 2.
while(i<100) {
is_prime=true;
for(j=2; j<i; j++){
if(i%j == 0){
is_prime = false;
}
}
if(is_prime){
cout<< i <<" ";
}
i++;
}
return 0;
}
Video link of this code with output click here
output -
Subscribe to:
Post Comments (Atom)
C++ BLACKJACK
#include <iostream> #include <ctime> #include <stdlib.h> #include <time.h> #include <string> using namesp...
-
Code #include <iostream> using namespace std; void prime_factor(int n); int main() { int n; cout<<"Enter a numbe...
-
Code #include <iostream> using namespace std; int main() { int i,j,r; cout << " Input number of rows : "; ...
-
Code #include <iostream> using namespace std; int main(){ int i=2, j, is_prime; // we set i = 2 because prime numbers start a...
As in Pakistan, there is a nice variety of bettors who choose to bet online on well-known websites from 사설토토 the West. India is experiencing a rapid progress of its online playing market, although playing as an entire may be very restricted throughout the country. Horse racing and lotteries are the one fully authorized playing actions.
ReplyDelete