treating char as int
Hi all,I need to create a program that does something like this:I)The user enters numbers and chars, for example 2,a,3,b,1,a;II)then it does 2*a+3*b+1*a = 3*a+3*bSo, how do I treat int and chars this way?Thx
[256 byte] By [
ThomYorka] at [2007-11-27 2:03:14]

You're talking about a numeric formula evaluator. This has nothing to do with char or int.Rather, you need to parse the input, figure out that "+" means plus, and "2a+3a" is equivalent to "5a", etc.