using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_92
{
class Program
{
static void Main(string[] args)
{
int n,a,b,c;
do
{
Console.Write("nhap n="); n = int.Parse(Console.ReadLine());
} while (n <= 0 || n >= 1000);
for (a = 0; a <= n; a++)
for (b = 0; b <=n; b++)
for (c = 0; c <= n; c++)
if (n == 2 * a + 3 * b + c)
Console.Write(a + "\t" + b + "\t" + c+"\n");
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_92
{
class Program
{
static void Main(string[] args)
{
int n,a,b,c;
do
{
Console.Write("nhap n="); n = int.Parse(Console.ReadLine());
} while (n <= 0 || n >= 1000);
for (a = 0; a <= n; a++)
for (b = 0; b <=n; b++)
for (c = 0; c <= n; c++)
if (n == 2 * a + 3 * b + c)
Console.Write(a + "\t" + b + "\t" + c+"\n");
Console.ReadKey();
}
}
}