Name: Anonymous 2012-01-06 11:59
#include <iostream>
using namespace std;
///////World's smallest prime number generator (u jelly? u mirin? lol deal with it homo)
int main() {
int count,n = 0;
cout << "\t>that feel when prime number generator\n\nEnter the number at which you want to stop checking primes--go!\n";
cin >> n;
cout << "\n\n";
for(int i=2;i<=n;++i) {
for(int b=2;b<i;++b) {
if((i%b)==0 && i!=b) ++count;
}
if(count==0) cout << i << " is a prime\n";
count=0;
}
return 0;
}
using namespace std;
///////World's smallest prime number generator (u jelly? u mirin? lol deal with it homo)
int main() {
int count,n = 0;
cout << "\t>that feel when prime number generator\n\nEnter the number at which you want to stop checking primes--go!\n";
cin >> n;
cout << "\n\n";
for(int i=2;i<=n;++i) {
for(int b=2;b<i;++b) {
if((i%b)==0 && i!=b) ++count;
}
if(count==0) cout << i << " is a prime\n";
count=0;
}
return 0;
}