I am having a problem dividing two numbers. When I divide 150 / 50, I get the answer 3. But when I divide 50 / 150 , I get zero. Can anyone please help with this issue. I am using FastReport.NET
You are using integer division. So even if you are assigning the result to a datatype for a decimal value, it will be an integer. Try casting one of the values to a double or decimal and you will get the expected result.
Comments