#include <stdio.h>
#include <string.h>
int main()
{
char str[] = "SUMIT";
int len = strlen(str);
int i,j;
for(i = 0; i < len; i++)
{
for(j = 1; j <= len; j++)
{
printf("%c ", str[len-j]);
}
printf("\n");
}
return 0;
}
#include <iostream.h>
#include <string.h>
int main()
{
char str[] = "SUMIT";
int len = strlen(str);
for(int i = 0; i < len; i++)
{
for(int j = 1; j <= len; j++)
{
cout<<str[len - j]<<" ";
}
cout<<endl;
}
return 0;
}
class PatternProg
{
public static void main(String args[])
{
String str = "SUMIT";
int len = str.length();
for (int i = 0; i < len; i++)
{
for (int j = 1; j <= len; j++)
{
System.out.print(str.charAt(len - j)+" ");
}
System.out.println();
}
}
}
using System;
class PatternProg
{
public static void Main()
{
string str = "SUMIT";
int len = str.Length;
for (int i = 0; i < len; i++)
{
for (int j = 1; j <= len; j++)
{
Console.Write(str[len - j] + " ");
}
Console.WriteLine();
}
Console.ReadKey(true);
}
}
string = "SUMIT"
length = len(string)
for x in range(0, length):
for y in range(1, length + 1):
print(string[length - y]+" ",end="")
print()