Computer Science, asked by Amaan55961, 8 hours ago

• Write a Java program to display following pattern on the screen. I IN IND INDI INDIA

Answers

Answered by Jha28utkarsh
0

Answer:

var a = prompt("Enter a string","India").toUpperCase(),n = "";

for (i = 0; i < a.length+1; i++) n+=a.slice(0,i)+"\n";

alert(n);

Answered by biswajit2002sl
0

Answer:

The following pattern :

I

IN

IND

INDI

INDIA

can be printed as follows :

class pattern_print

{

    public static void main(String args[])

    {

         System .out. println("I");

         System .out. println("IN");

         System .out. println("IND");

         System .out. println("INDI");

         System .out. println("INDIA");

   }

}

#SPJ3

Similar questions