2011-05-23, 12:54 AM
Eosian Wrote:Modulo for both?
Pretty much yes. I remember that i was taught that but forgot about it, while i got caught up recently on a problem that needed to find if a number was Odd and Even and could not remember the method to do so.
Eosian Wrote:C is a low level language, it does not have any natural ways to print values without explicitly casting them into a character string via a format conversion function like printf. The other languages you can just say print @variable and the engine knows to bring the value of the variable, but with C you have to be more specific, because print requires a character string and x is a number, therefore you need to convert x into a character string to print it, either via that function, or a more torturous route such as creating a character array and printing to that array the value of the variable. Could've possibly done a print( itoa(x)); as well.
This is still a little fuzzy but i can understand my way from what you and kalovale said, need to see it in action to completely understand it. Thx for the answers btw.

