#include<stdio.h>
int main()
{
int n=5; // size
int i,j,k;
for(i=n; i>=1; i--)
{
for(j=n-1; j>=i; j--)
{
printf(" ");
}
for(k=1; k<=i; k++)
{
printf("%d",i);
}
printf("\n");
}
return 0;
}
#include<iostream.h>
int main()
{
int n=5; // size
int i,j,k;
for(int i =n;i>=1;i--)
{
for(int j =n-1;j>=i;j--)
{
cout<<" ";
}
for(int k =1;k<=i;k++)
{
cout<<i;
}
cout<<endl;
}
return 0;
}
class PatternProg
{
public static void main(String args[])
{
int n = 5; // size
for (int i = n;i >= 1;i--)
{
for (int j = n - 1;j >= i;j--)
{
System.out.print(" ");
}
for (int k = 1;k <= i;k++)
{
System.out.print(i);
}
System.out.println();
}
}
}
using System;
class PatternProg
{
public static void Main()
{
int n = 5; // size
for (int i = n; i >= 1; i--)
{
for (int j = n - 1; j >= i; j--)
{
Console.Write(" ");
}
for (int k = 1; k <= i; k++)
{
Console.Write(i);
}
Console.WriteLine();
}
Console.ReadKey(true);
}
}
for x in range(5, 0, -1):
for y in range(x, 5):
print(" ", end="")
for z in range(0, x):
print(x, end="")
print()