Write A Program To Print The Following Output Using The For Loop. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5?

4

4 Answers

Anonymous Profile
Anonymous answered
I also want this pattern
1
2  2
3  3  3
4  4  4  4
5  5  5  5 5
thanked the writer.
Anonymous
Anonymous commented
#include

int main()
{
int i, j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}

return 0;
}
(if u know programing then u will add getch and also if u understand this tell me thanks
)
Anonymous Profile
Anonymous answered
Class Number
{
    public static void main(String args[])
    {
      for (int I=1; I
Alongbar Daimary Profile
You can Try this.  class Display{ public static void main(String[]ar){  for(int I=1;I<=5;I++){   for(int j=1;j<=I;j++){    System.out.print (I);   }   //System.out.println();  } } }
thanked the writer.
Anonymous
Anonymous commented
Hey, It is not printing out same as we expecting like below:
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

Answer Question

Anonymous