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