Menu
Question Index
...

Write a program to print the following character formation using the input String. Spaces in between characters are important. Use System.out.println or System.out.print for printing.

Input (String) Printed Output
antartica a
a n
a n t
a n t a
a n t a r
a n t a r t
a n t a r t i
a n t a r t i c
a n t a r t i c a
GLOBAL G
G L
G L O
G L O B
G L O B A
G L O B A L



class PrintFormation
{
    public static void main(String s[])
    {
        printFormation("antartica");

    }


    public static void printFormation(String name)
    {
    }

}

Doubts

Problems

Topic: charAt() Method In Java - Java Character Extraction

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App