First of all let us understand what a Strong Number is. A number is called a Strong Number if the sum of the factorials of each of its digits is equal to the number itself. In other words, the sum of the factorials of digits of a number is equal to the original number.
Example: Number 145=1!+4!+5!
In this article I explain how to create a Strong Number application in a Windows Store app.
Use the following procedure to create the Strong Number app.
Step 1
First you must create a New Window Store Application, as in:
- Open Visual Studio 2012
- "File" -> "New" -> "Project..."
- Choose Template: "Visual C#" -> "Window Store app"
- "Blank App (XAML)", then rename the application

Step 2
Write the following XAML code in "Mainpage.Xaml" (that is available in Solution Explorer):
<Page
x:Class="Strong_Number_app.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:armstrong_app"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="Blue">
<Grid.RowDefinitions>
<RowDefinition Height="38*"/>
<RowDefinition Height="23*"/>
<RowDefinition Height="31*"/>
<RowDefinition Height="32*"/>
<RowDefinition Height="63*"/>
<RowDefinition Height="581*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="161*"/>
<ColumnDefinition Width="303*"/>
<ColumnDefinition Width="902*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Check Number is Strong Number or not" FontFamily="Arial" FontSize="14" FontWeight="ExtraBold" Foreground="Red" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2"></TextBlock>
<TextBlock Text="Enter Number:" FontFamily="Arial" FontSize="15" FontWeight="ExtraBold" Foreground="Red" Grid.Column="1" Grid.Row="2"></TextBlock>
<TextBox x:Name="Textbox1" Width="150" Height="32" VerticalAlignment="Top" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Left" Grid.RowSpan="2" />

Join the conversation! Your thoughts help the community grow.