I have a problem when I try to solve simple equation. My equation is find the percentage of student marks. This is my code:
using System; using System.Collection
The type of a result depends on the variables that are used.
Any mathematical operation between 2 ints will return an int. You need to cast one of them to a decimal before doing the mathematical operation:
int
res = (oneee / (decimal)two) * 10;