Combination for three dice and sum

CSharp · Console

/Program.cs

using System;
					
public class Program
{
	public static void Main()
	{
		Console.WriteLine("Hello World");
		int count = 0;
		for(int i = 1;i<=6;i++)
			for(int j = 1;j<=6;j++)
				for(int k=1;k<=6;k++)
		{
			if(i+j+k == 13)
			{
				Console.WriteLine(i + "+" + j+"+"+k+"="+(i+j+k));
				count++;
			}
		}
		
		Console.WriteLine("Possible number of combinations :" + count);
		
	}
}
;