Hello
Try this way
int total = 2500;
int[] strValue = new int[] { 400, 300, 200, 100 };
int[] finalResult = new int[strValue.Length];
for (int i = 0; i < strValue.Length; i++)
{
int reminder = total / Convert.ToInt32(strValue[i]);
int mod = total % Convert.ToInt32(strValue[i]);
finalResult[i] = reminder;
total = mod;
}