Digital 7-Shaped String
java code:
import java.util.*;
public class Hello
{
public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
String st=s.nextLine();
char str[]=st.toCharArray();
int c,l=str.length;
for(int i=0;i<l;i++)
{
c=1;
for(int j=l-1;j>=0;j--)
{
if(i<=j)
System.out.print(str[i]+" ");
else
{
System.out.print(str[i-c]+" ");
c++;
}
}
System.out.println();
}
}
}
public class Hello
{
public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
String st=s.nextLine();
char str[]=st.toCharArray();
int c,l=str.length;
for(int i=0;i<l;i++)
{
c=1;
for(int j=l-1;j>=0;j--)
{
if(i<=j)
System.out.print(str[i]+" ");
else
{
System.out.print(str[i-c]+" ");
c++;
}
}
System.out.println();
}
}
}
Casino site review - Lucky Club
ReplyDeleteLive casino casino, licensed & approved by the Curacao Gaming Authority. The gaming house that hosts games from around the luckyclub.live world is a large betting Rating: 5 · Review by LuckyClub