Ternary Operator Help

pradeep's Avatar, Join Date: Apr 2005
Team Leader
Can anyone help me write this Excel formula in C/C++
Code:
=IF(C3>300000;IF(C3>600000;IF(C3>900000;IF(C3>1200000;IF(C3>1800000;IF(C3>2399999;300000);210000);90000);60000);45000);0)
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
My Excel says its an invalid one.
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
It's a valid one, cause I used it on an Excel sheet, btw i have solved it,
Code: C
(iCtc>300000)?(iCtc>600000)?(iCtc>900000)?(iCtc>1200000)?(iCtc>1800000)?(iCtc>2399999)?300000:0:210000:90000:60000:45000:0;