I can't figure out what's wrong, can somebody help?
problem 17 on projecteuler
>>54505833
There should be color options, you're gonna want to set the background field to ffffff
>>54505869
my background goes well with the preset colors, so no
can you help me
I just solved this with a pen and paper; it's pretty easy if you group things right. Just note that its 'forty' not 'fourty'. That wasted about 30 minutes of my time lol
>>54505833
Why don't you start by explaining why you think your program is wrong?
>>54505943
it doesn't give the right answer
I've tried some sample inputs and they're all correct
but it still gives wrong output
>the output says n "words"
Is that a typo or are you counting words? You should count chars
>you're typing "forty" but using "and" in the hundreds
Project Euler says that "and" is valid for British English so you may want to change forty to fourty or remove the ands.
>>54505993
yeah, it's a typo
let me try with fourty
but I doubt it since their example spells "forty"
I'll try not to spoil the answer too much.
You are somehow most likely counting the word "hundred" twice. This is because the difference from your answer and the right one is exactly the number of characters of all the "hundred"s.
SOMEBODY HALP