skip to main | skip to sidebar

Poodwaddle and Bubs Stuff

Friday, November 14, 2008

hthgfhf

#include //for this purpose I will use iostream
using namespace std;

bool checkPrime(long num){
if(num==1 || num==0){return false;}
for(int i=2;iif(a%i!=0){ //if at any time there's a remainder
return false;
}
}
return true; //if it makes it past the for loop
}

int main( int a ){
cout<<"Enter the number you want to check."<cin>>a;
if(checkPrime(a)){
cout<<"The number was prime."<}
else{
cout<<"The number was not prime."<}
getchar();
}
Posted by Benno, at 11:20 PM No comments:

Wednesday, January 23, 2008

Posted by Benno, at 9:04 PM No comments:

Thursday, January 17, 2008

Adopt one today!
Posted by Benno, at 4:04 AM No comments:
Adopt one today!
Posted by Benno, at 4:03 AM No comments:
Adopt one today!
Posted by Benno, at 4:03 AM No comments:
Adopt one today!
Posted by Benno, at 4:02 AM No comments:

Monday, January 14, 2008

Posted by Benno, at 4:56 PM No comments:
Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ▼  2008 (14)
    • ▼  November (1)
      • hthgfhf
    • ►  January (13)
  • ►  2007 (28)
    • ►  December (2)
    • ►  November (20)
    • ►  October (6)
View my complete profile