In this article I explain Floyd's Triangle in programming languages. But let us first of all understand what Floyd's Triangle is.
Floyd's Triangle
It is a right angle triangle of a natural number.
Use the following step to create the Floyd's Triangle in a Windows Store app.
Step 1
First of all you have to create a New Window Store Application.
- Open Visual Studio 2012
- "File" -> "New" -> "Project..."
- Choose "Template" -> "Visual C#" -> "Window Store app"
- Choose "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="Floyd_triangle_app.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Floyd_triangle_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.ColumnDefinitions>
<ColumnDefinition Width="643*"/>
<ColumnDefinition Width="723*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="143*"/>
<RowDefinition Height="38*"/>
<RowDefinition Height="43*"/>
<RowDefinition Height="300*"/>
<RowDefinition Height="0*"/>
<RowDefinition Height="39*"/>
<RowDefinition Height="205*"/>
</Grid.RowDefinitions>
<TextBlock Text="Floyd Trangle Example" FontSize="25" FontWeight="ExtraBold" Grid.ColumnSpan="2" Grid.Row="1" TextAlignment="Center" Foreground="Red" ></TextBlock>
<TextBlock Text="Enter Line no:" FontSize="25" FontWeight="ExtraBold" Grid.Column="0" Grid.Row="2" Foreground="Red" TextAlignment="Right" ></TextBlock>
<TextBox x:Name="textbox1" Grid.Column="1" Grid.Row="2" Width="150" Height="35" VerticalAlignment="Top" HorizontalAlignment="Left" />


Join the conversation! Your thoughts help the community grow.