Computer Science, asked by Anonymous, 1 year ago

hey friends
back with a new question
pls help
it is java

Attachments:

Answers

Answered by mitu123456
3

Its very easy

a. for(i=1;i<=5;i++)

   {

     for(j=1;j<=i;j++)

     {

       System.out.print("*");

     }

     System.out.println(" ");

   }

b. for(i=1;i<=5;i++)

   {

     for(j=1;j<=1;j++)

     {

      System.out.print(j);

    }

    System.out.println(" ");

  }

c. for(i=0;i<5;i++)

   {

    for(j=i+1;j<=5;j++)

    {

      System;out.print(j);

    }

    System.out.println(" ");

  }

d. for(i=1;i<=5;i++)

   {

    for(j=1;j<=i;j++)

    {

     System.out.print(i);

   }

   System.out.println("");

 }



Hope it helps


Similar questions