HardQuor's forum posts
And to believe that one's existence is intrinsically meaningless and needs to be validated by some act or set of actions is also a fallacy. We each carry a huge impact on those we commune with, form relationships with. Hell, each conception and birth each impact parents more than almost any other event in their lives. If you feel the need to reach more people than everyone else to "insure your immortality in the annals of history", then that is the very definition of an megalomaniac, and you should put yourself in check.
Ask yourself this question: what math is the program attempting when n = 0?If n = 0, and x = 0 on the first loop, since (0 % 0) == 0, then it fails to enter the if statement, so shouldn't it just increment n and start over?
(There are other problems with the program, but they aren't what's making it crash.)
GabuEx
Hmm. A general rule they have at Project Euler is that a program run on a decent computer should have no problem rendering the solution to any of it's problems in under a minute. Also, i'm having a hard time understanding what you're trying to describe. You said you included a loop like mine in your code, but i couldn't get my loop to work :?You're going to need 2 loops for this one: one to increment your target number, and one to loop over your divisions.
Try:
bool check=false;
int x=1;
int target=1;
while(!check){ *Note: a do...while will work, too, if it makes you more comfortable.
*second loop goes here, much like the one you put up earlier*
I used a "break" condition if (target%x!=0) here, and an else-if to check if x==20 and change the boolean to "true."
If the loop exited and check was still false, I incremented the target.
}
Then I spat it to the command line, and done.
It took forever to run: the answer is HUGE.
Hope this helps. :D
OrkHammer007
anyhow, i'm currently trying something new, i'm starting the for loop at 10 and having it decrement after each successful dividend is found, and have gotten that to work wonderfully. Unfortunately, that just makes x a dividend of the next number while being greater than it's own last value (i.e. 10 for 10, 18 for 9, 24 for 8, 28 for 7, etc.)I'm not sure how to make it check it's value against each previous divisor.
It's zombie thread time. sorry.
Anyhow, this time i'm more confuzzled than ever before. I got through problem 6 just fine, but the next step up the difficulty ladder (problem 5), is proving much more complicated. Here's the problem.
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest number that is evenly divisible by all of the numbers from 1 to 20?
and my code so far
int x=0;
for( int n=0; n (less than or equal to) 10; n++ )
{
if( (x % n) != 0 )
{
x++;
};
};
I'm only doing the first 10 as a proof of concept, since they give me the answer for that, so i can tell when i've done something wrong. As far as i can tell, i think i'm on the right path. "For each number up to ten, if x is not divisible by it, then increase x by 1.." it compiles fine, but it crashes at runtime for some reason. Anyone know what's going on? :?
1: Would look better with thinner surrounding borders instead of the thick ones at top and bottom. also, i would lose the 3 weird blurry lens-flare things. 6.5/10Please rate these sigs and state wich one I should use. I have made eeach sig.
Rate and choose which I should use.
jewls555
2: Looks great as is, can't think of anything to improve it. 9/10
3: it looks like you sharpened your background render to make it look more 3d, like it wants to come to the foreground. Unfortunately it looks too messy and doesnt flow very well with the color scheme. also, it's colors stand out more than kratos does. 6/10
4: WTF? Is that an anthro Raichu??? anyways, again, the background render really detracts from your foreground focus. too much going on, too messy. 6/10
[QUOTE="HardQuor"][QUOTE="EMOEVOLUTION"]So you believe science is absolute? IT is perfect and has no flaws? Science is only as good as the human genetics will allow it to be. Our perception is not capable of answering everything, and never will be. Those that believe it can, are going to be sorely disappointed. EMOEVOLUTIONRead more carefully before assuming my arguments. Oh, I guess next time I'll avoid putting you on the spot because you don't really have an answer. That's an assumption. The previous was a question followed by my reasoning, looking for you to explain why that form of thinking is wrong.
Ha. And i thought i was obnoxious concerning the topic. I said "Read more carefully" because your 2 questions would have been answered if you had. I said that "Atheists believe in only that which can be proven possible" and NOT "Atheists believe that science is absolute, perfect, and flawless."
So since you've proven yourself too dense to understand it the first two times, i'll dumb it down for you: "Atheists believe in only things that have a sufficient amount of supporting evidence, given their resources. These things are subject to change as their resources do."
[QUOTE="HardQuor"]You're wrong. The difference between religion and atheism is fundamental. Atheists fundamentally believe in only what can be proven possible. Religious zealots believe in only what they're told.[QUOTE="EMOEVOLUTION"]Well, Atheists really aren't that different from theists. They both believe in something they have no way of proving. I don't mind that, because it's human nature to fill in the blanks. But, the fact is nobody has a definate answer. All they have is the belief in whatever system they are using to define their existance. There is nothing wrong with this by any means. What bothers me is that the two are more interested in trying to say the other is wrong, than doing anything positive.
EMOEVOLUTION
---edit---
spalling.
[QUOTE="EMOEVOLUTION"]Well, Atheists really aren't that different from theists. They both believe in something they have no way of proving. I don't mind that, because it's human nature to fill in the blanks. But, the fact is nobody has a definate answer. All they have is the belief in whatever system they are using to define their existance. There is nothing wrong with this by any means. What bothers me is that the two are more interested in trying to say the other is wrong, than doing anything positive.
htekemerald
The way I see it atheists subscribe to the innocent till proven guilty ideal. That is you need proof before making a claim
Where the Theists believe in the guilt to proven innocent ideal. That is everything is real and need t be disproven.
That is a shockingly daft interpretation. very nice.
Well, Atheists really aren't that different from theists. They both believe in something they have no way of proving. I don't mind that, because it's human nature to fill in the blanks. But, the fact is nobody has a definate answer. All they have is the belief in whatever system they are using to define their existance. There is nothing wrong with this by any means. What bothers me is that the two are more interested in trying to say the other is wrong, than doing anything positive.You're wrong. The difference between religion and atheism is fundamental. Atheists fundamentally believe in only what can be proven possible. Religious zealots believe in only what they're told.
EMOEVOLUTION
---edit---
spalling.
Log in to comment