'\0' is an int. Character literals in C are ints.
Hi, Im experiencing a slight issue, this maybe what you guys were discussing. The loop works nicely except that when two zeros are multiplied the loop breaks. Is "digit != '\0'" not the correct condition for this?
that makes a lot of sense, so I changed it from "digit" to "number2", but nothings changed?
example:
101
x101
-----
101
-----
10201
when its supposed to be:
101
x101
------
101
10100
------
10201
edit: nevermind, im so dumb. got it solved.
Last question, im having it display the product only if its not the final answer or a zero, so I have this condition:
if (product != final_product || product != 0)
{
print product
}
however, only the first part of that condition works. zeros are still displayed. Is the formatting wrong? Im not getting any errors when im compiling it
Last edited by wankel; 06-15-2009 at 04:44 PM.