using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_57
{
class Program
{
static void Main(string[] args)
{
int n,a,b,c,d;
do
{
Console.Write("nhap so tien can doi:"); n = int.Parse(Console.ReadLine());
} while (n < 1000);
for (a = 0; a <= (1000 / 10); a++)
{
for (b = 0; b <=( 1000 / 20); b++)
{
for (c = 0; c <= (1000 / 50); c++)
{
for (d = 0; d <=( 1000 / 100); d++)
{
if ((10 * a + 20 * b + 50 * c + 100 * d) == n)
Console.Write(a + "\t" + b + "\t" + c + "\t" + d + "\n");
}
}
}
}
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_57
{
class Program
{
static void Main(string[] args)
{
int n,a,b,c,d;
do
{
Console.Write("nhap so tien can doi:"); n = int.Parse(Console.ReadLine());
} while (n < 1000);
for (a = 0; a <= (1000 / 10); a++)
{
for (b = 0; b <=( 1000 / 20); b++)
{
for (c = 0; c <= (1000 / 50); c++)
{
for (d = 0; d <=( 1000 / 100); d++)
{
if ((10 * a + 20 * b + 50 * c + 100 * d) == n)
Console.Write(a + "\t" + b + "\t" + c + "\t" + d + "\n");
}
}
}
}
Console.ReadKey();
}
}
}