@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13



Comments:

<0> to simplify/make more rigerous
<1> processing
<2> everything is processing
<1> http://rafb.net/paste/results/QOWl7C58.html
<1> is it like that?
<0> looks fairly good
<0> you'll need a loop
<1> in where?
<0> but thats a reasonable psuedocode style
<0> around your IFs
<1> if i put in befor all IF loops?
<1> i mean the loop
<0> and there are a few logic bugs, but I'll leave you to discover them :)
<0> wouldn't want to remove all the fun
<1> :(
<0> next thing to do is try to implement your algorithm



<1> implement
<1> it's in the coding part right now right?
<0> yup
<1> hmmm...
<1> how do i put a code to check if XIIX is ambigiuous ?
<0> another little foible to work out :)
<2> razoer, how do you compute in your brain XIIX is ambiguous?
<1> ....
<1> i read the last one?
<1> hmm...
<3> XIIX is not ambigiuous, it's invalid
<0> tomato, tomato in this context
<1> tomato?
<3> Asriel: accepting wrong numerals makes the task more complex
<1> ?_?
<0> which is why you identify the ambiguity and reject the input
<1> ya
<1> but now i cannot think of a code that reads along the roman numeral symbols
<1> and if detects ambiguity it' bails
<1> can COMPARE be used?
<1> is getline(cin,input) useful on this?
<1> can be used?
<1> to compare?
<0> sorry, a bit busy atm
<1> i'll wait
<0> your original method was reasoanble for getting the data and looking at each character
<1> >_.
<3> i'd do the validation during the conversion
<1> during or after?
<3> during
<1> like during switch?
<3> yes
<1> so how to compare each other during the switch
<3> well
<3> you need to define rules that say how a roman numeral is constructed
<1> how to define them?
<3> a roman numeral is a series of characters whose value is non-decreasing. only power-of-10 characters can occur more that once. in addition, a charecter with value x can precede a charector with value x*10 or x*5
<3> charActEr
<3> erm
<3> non-increasing instead of non-decreasing
<1> non-increasing?
<3> doesn't increase
<3> means decreases or stays equal
<1> the values ***igned to the roman numeral?
<3> yes
<3> XIV -> it has a non-increasing series XV. additionally I (1) is prepended to V (1*5)
<1> that means
<1> XXXLIV
<1> it's like
<1> 24?
<3> that's invalid
<1> why is it invalid?
<3> you can only prepend one character
<3> you're non-increasing series is LV, right?
<3> you prepend I to V, that's ok
<1> yeah
<3> you prepend 3 times X to L, that's not ok. you can only prepend one character
<1> that means
<1> i can only input
<1> XLIV?
<3> that's ok



<1> OOOooooOo
<1> understanding abit now
<1> so i for each symbol
<3> every number has only one representation
<1> i can only put one prepend?
<1> but if it's
<3> yes
<1> XVII
<1> it's ok right?
<3> yup
<1> it's not prepend right?
<3> indeed
<3> XVII is X+V+I+I only adding
<1> yeah
<1> understood
<3> you can only substract once from a character
<2> stupid romans
<1> i now know why it won't appear IIX
<3> XIV = X+V-I ... ok XIIV = X+V-I-I ... not ok
<3> smart arabs!
<1> if it wanted to get the output
<1> it should be XIII?
<3> yes
<1> for the invalid XIIV?
<2> http://www.doc.ic.ac.uk/game/
<2> if anyone is interested
<3> indeed
<3> i answered to quickly, but yes :)
<1> ok
<1> now i can get the hang of roman numerals
<1> i can't figure out how to ReAD the roman numeral to see if it's invalid during the switch process :(
<1> is like i'm putting it inside the switch?
<3> yes
<4> razoer: heres a page i found with info to help with the project you asked about last night: http://mathforum.org/library/drmath/view/55837.html
<4> determining what day jan 1 falls on a given year is the trickiest part of that problem
<1> http://rafb.net/paste/results/QDGy8R54.html
<1> i got like 3 projects still ongoing :(
<1> is this on the track?
<1> or i need to fixed it up ALOT?
<3> razoer: for every character, you check if it's a substraction or addition. if a larger numeral is next, you know it should be substraction. you keep track of the last numeral that was involved in an addition. If you're adding, and the value you're adding is larger than the previous added value, you know it's invalid
<3> so if (is valid substraction) substract; else if (is valid addition) add; else error!;
<1> yeah
<1> but
<1> the problem is
<1> the code i wrote only output the last char symbol
<1> it doesnt read all
<1> :(
<1> i mean all the roman numerals i inputted :(
<1> the code i wrote are correct right?
<1> or in the FOR loop i need to fix it up abit
<3> razoer: you re-***ign 'value' each time
<3> so it's normal that you get the last value
<1> so how to i ***ign the values :(
<3> you wan't to add (or substract)
<1> yeah
<3> value += 100; for instance
<3> instead of value = 100;
<1> it's value = value+100?
<3> yep
<3> you also need value = 0; somewhere in the beginning
<3> in order to initialize that variable
<1> so in the variable declaration part
<1> i set the INT value=0?
<3> yup, that's how i would do it
<3> (int in lowercase however)
<1> yeah
<1> but i put it uppercase so that it represent a CODE
<1> and not tobe mistaken as a common word :(
<3> :)
<1> so after the CASE declaration
<1> i should put value+=value?
<1> or i should put other ont the [value]+=value
<3> case 'I':value=1; should be case 'I':value += 1;
<1> and on other cases also?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

#ubuntu
hry barbye
lista de links megaupload
#AllNiteCafe
theaquatoystore
libc_12.html#SEC196
LARGEST BRICKFIELDS
#mysql
What did Ira Remsen discover in 1879, perhaps proclaiming 'How sweet it is'
tomcat mydsl



Home  |  disclaimer  |  contact  |  submit quotes