Java Program For Pyramid Of Numbers

116 comments - Post a comment

Pyramid Sequence

1
1 2
1 2 3
1 2 3 4

class Pyramid1
{
public static void main(String args[])
{
int i,j;
for(i=1;i< =4;i++)
{
for(j=1;j< =i;j++)
System.out.print(" "+j);
System.out.print("\n");
}
}
}

/********* OUTPUT ********
1
1 2
1 2 3
1 2 3 4 */

 
This Post has 116 Comments Add your own!
Anonymous - February 18, 2009 at 8:28 PM

I want the answer of:
1
12
123
12
1

Lionel - February 18, 2009 at 9:03 PM

here is the code :
class Pyramid1
{
public static void main(String args[])
{
int i,j;
for(i=1;i< =3;i++)
{
for(j=1;j< =i;j++)
System.out.print(" "+j);
System.out.print("\n");
}
for(i=2;i> =1;i--)
{
for(j=1;j< =i;j++)
System.out.print(" "+j);
System.out.print("\n");
}
}
}

Anonymous - July 8, 2009 at 6:45 PM

how do you do this?
1
121
12321
1234321
123454321
12345654321
123454321
1234321
12321
121
1

Lionel - July 8, 2009 at 9:49 PM

@calvin
here is the code :
i think it should work
class Pyramid1
{
public static void main(String args[])
{
int i,k,j;
for(i=1;i< =6;i++)
{
for(j=1;j< =i;j++)
System.out.print(" "+j);
for(k=i-1;k> =1;k--)
System.out.print(" "+k);
System.out.print("\n");
}
for(i=5;i> =1;i--)
{
for(j=1;j< =i;j++)
System.out.print(" "+j);
for(k=i-1;k> =1;k--)
System.out.print(" "+k);
}
}
}

Rajiv - August 21, 2009 at 1:20 PM

Above code is not proper working..............

MrAbey89 - September 8, 2009 at 6:21 AM

Can you help me please!!
I want the answer of :

1
1 2 1
1 2 4 2 1
1 2 4 8 4 2 1
1 2 4 8 16 8 4 2 1
1 2 4 8 16 32 16 8 4 2 1

Anonymous - October 22, 2009 at 1:52 AM

Hi! I'm a beginner in Java can you please give a sample code for this:

0
90
890
7890
67890
567890
4567890
34567890
234567890
1234567890

BROC - December 27, 2009 at 8:34 PM

i want answer of:
*
* *
* * *
* * * *

Anonymous - February 3, 2010 at 8:15 AM

hi i need code for the output
1
2 3 2
3 4 5 4 3
4 5 6 7 6 5 4
5 6 7 8 9 8 7 6 5

Anonymous - March 28, 2010 at 9:47 PM

hi
i want this output

4
3 4 3
2 3 4 3 2
1 2 3 4 3 2 1

Anonymous - March 28, 2010 at 9:49 PM

hi
i want this output

4
3 4 3
2 3 4 3 2
1 2 3 4 3 2 1

Anonymous - March 28, 2010 at 9:49 PM

hi
i want this output

4
3 4 3
2 3 4 3 2
1 2 3 4 3 2 1

Anonymous - June 23, 2010 at 5:55 PM

class Loop
{
public static void main (String args[])
{

for
(int i=1; i<=9; i++)
{
for
(int j=1; j<=i; j++)
{
System.out.print("");
System.out.print(*);
}
System.out.print("\n");
}
System.out.println ("\n");
}
}

Anonymous - July 8, 2010 at 9:19 PM

i want a program to print
1
2 3
4 5 6
7 8 9 10

Anonymous - August 9, 2010 at 4:30 PM

Write a java program to print
123
456
789

Anonymous - August 9, 2010 at 4:32 PM

Write a java program to print
123
456
789

Anonymous - August 24, 2010 at 3:25 PM

hw if using the 'do while' loop?

Anonymous - September 9, 2010 at 5:39 PM

I want answer to this pls...
1
222
33333
4444444
555555555

Anonymous - October 13, 2010 at 8:52 PM

@abey:
class Pyramid{
public static void main(String args[]){
int i,k,j;
for(i=1;i<=128;i= i*2){

for(j=1; j<=i; j=j*2)
System.out.print(j + " ");

for(k=i/2; k>=1; k=k/2)
System.out.print( k + " ");
System.out.print("\n");

}


}
}

Anonymous - October 15, 2010 at 5:59 PM

how to make as java program using for loop that will look like this

1
121
12321
1234321
123454321

need it on wednesday

Anonymous - October 17, 2010 at 2:24 PM

hi..i am ikko...
how can i get this result frmo a java program??

----------------------1
--------------------1 2 1
------------------1 2 4 2 1
----------------1 2 4 8 4 2 1
-------------1 2 4 8 16 8 4 2 1
---------1 2 4 8 16 32 16 8 4 2 1
------1 2 4 8 16 32 64 32 16 8 4 2 1
--1 2 4 8 16 32 64 128 64 32 16 8 4 2 1

Jason C. - October 29, 2010 at 7:06 PM

public static void count(int n) {
int s = 1;

for (int i = 1; i <= n; i++) {
while (s <= i) {
System.out.print(s);
s++;
}
s--;
while (s > 1) {
System.out.print(--s);

}
System.out.println();
}
}
//output for this one:
1
121
12321
1234321
etc. etc.

public static void value_times_two(int n) {
int s, p;
s = 1;
p = 1;

for (int i = 1; i <= n; i++) {
p = 1;
System.out.print(p);
while (s <= i) {
System.out.print(p *= 2);

s++;
}
while (s > 1) {
System.out.print(p /= 2);
--s;
}
System.out.println();
}
}
//expected output for this one is as follows:
1
121
12421
1248421
etc. etc.

Anonymous - November 3, 2010 at 3:53 PM

hi..
Can anyone give me code for below output...??
A
A B A
A B C B A
A B C D C B A
A B C D E D C B A

Anonymous - November 28, 2010 at 1:07 PM

i need a code for this program :]
kindly help me thanks .

1
232
34543
4567654
567898765

tuxedo mask - December 15, 2010 at 7:13 AM

how to create triangle of numbers in this type of form:
output:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

Unknown - March 9, 2011 at 1:34 PM

*
* *
* * * *
* * * * * * * *

Unknown - March 9, 2011 at 1:35 PM

I want the answer of :
*
* *
* * * *
* * * * * * * *

Tom - May 4, 2011 at 12:19 PM

i want the answer for this



1
22
333
4444
55555
6666
777
88
9

Anonymous - May 4, 2011 at 12:22 PM

i need code for this

1
22
333
4444
55555
6666
777
88
9

Anonymous - June 8, 2011 at 1:53 AM

hey tom code fr
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
6 6 6 6
7 7 7
8 8
9

class Pyramid1
{
public static void main(String args[])
{
int k;
//for loop for the no of lines to print till 55555
for(int i=1;i<=5;i++)
{
System.out.println();
//for loop for printin da nos
for(int j=1;j<=i;j++)
{
k=i;
System.out.print(k);
}
}
//making k=6 to start printin 6666 after 55555
k=6;
for(int i=1;i<=4;i++)
{
//to change the line
System.out.println();
for(int j=4;j>=i;j--)
{
System.out.print(k);
}
k++;
}
}
}
hope it helps u,i hav tried it nd it works.

RONIT - July 7, 2011 at 5:52 PM

I want code of

1 1
12 21
123 321
12344321
123 321
12 21
1 1

RONIT - July 7, 2011 at 5:53 PM

I want code of

1 1
12 21
123 321
12344321
123 321
12 21
1 1

Anonymous - July 18, 2011 at 2:09 PM

can i have the code for
...........0
..........101
.........21012
........3210123
.......432101234

ProgSolution - July 31, 2011 at 1:18 AM

Program for this
1
212
32123
4321234
543212345
4321234
32123
212
1

Please fast

Anonymous - August 11, 2011 at 8:09 PM

i m anjali...
i get solution of this problem
**
****
******
********...plz help me

Manoj - August 14, 2011 at 7:27 AM

1
12
123
1234
this output program i could not understand please explain this program for pyramid.

mercy - September 7, 2011 at 10:49 AM

code for
1
2 2
3 3 3

kshiti - September 9, 2011 at 7:58 PM

i want d answer for
1
2 2
3 3 3
4 4 4 4
4 4 4 4
3 3 3
2 2
1

Anonymous - September 14, 2011 at 7:25 AM

i want this answer of

1 2 3 4 5 6 7 8 9 10

2 4 6 8 10 12 14 16 18 20

3 6 9 12 15 18 21 24 27 30

4 8 16 20 24 28 32 36 40

5 10 15 20 25 30 35 40 45 50

6 12 18 24 30 36 42 48 54 60

7 14 21 28 35 42 49 56 63 70

8 16 24 32 40 48 56 64 72 80

9 18 27 36 45 54 63 72 81 90

10 20 30 40 50 60 70 80 90 100

blogmoto - September 14, 2011 at 7:26 AM

i want this answer of

1 2 3 4 5 6 7 8 9 10

2 4 6 8 10 12 14 16 18 20

3 6 9 12 15 18 21 24 27 30

4 8 16 20 24 28 32 36 40

5 10 15 20 25 30 35 40 45 50

6 12 18 24 30 36 42 48 54 60

7 14 21 28 35 42 49 56 63 70

8 16 24 32 40 48 56 64 72 80

9 18 27 36 45 54 63 72 81 90

10 20 30 40 50 60 70 80 90 100

blogmoto - September 14, 2011 at 7:26 AM

i want this answer of

1 2 3 4 5 6 7 8 9 10

2 4 6 8 10 12 14 16 18 20

3 6 9 12 15 18 21 24 27 30

4 8 16 20 24 28 32 36 40

5 10 15 20 25 30 35 40 45 50

6 12 18 24 30 36 42 48 54 60

7 14 21 28 35 42 49 56 63 70

8 16 24 32 40 48 56 64 72 80

9 18 27 36 45 54 63 72 81 90

10 20 30 40 50 60 70 80 90 100

blogmoto - September 17, 2011 at 1:39 PM

1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
6 12 18 24 30 36 42 48 54 60
7 14 21 28 35 42 49 56 63 70
8 16 24 32 40 48 56 64 72 80
9 18 27 36 45 54 63 72 81 90
10 20 30 40 50 60 70 80 90 100

ENTER num 1 :
ENTER num 2:
"MULTIPLICATION TABLE " ANY NUMBER WILL DO..

blogmoto - September 17, 2011 at 1:39 PM

1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
6 12 18 24 30 36 42 48 54 60
7 14 21 28 35 42 49 56 63 70
8 16 24 32 40 48 56 64 72 80
9 18 27 36 45 54 63 72 81 90
10 20 30 40 50 60 70 80 90 100

ENTER num 1 :
ENTER num 2:
"MULTIPLICATION TABLE " ANY NUMBER WILL DO..

blogmoto - September 17, 2011 at 1:39 PM

1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
6 12 18 24 30 36 42 48 54 60
7 14 21 28 35 42 49 56 63 70
8 16 24 32 40 48 56 64 72 80
9 18 27 36 45 54 63 72 81 90
10 20 30 40 50 60 70 80 90 100

ENTER num 1 :
ENTER num 2:
"MULTIPLICATION TABLE " ANY NUMBER WILL DO..

blogmoto - September 17, 2011 at 1:39 PM

1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
6 12 18 24 30 36 42 48 54 60
7 14 21 28 35 42 49 56 63 70
8 16 24 32 40 48 56 64 72 80
9 18 27 36 45 54 63 72 81 90
10 20 30 40 50 60 70 80 90 100

ENTER num 1 :
ENTER num 2:
"MULTIPLICATION TABLE " ANY NUMBER WILL DO..

Anonymous - September 19, 2011 at 4:59 PM

anybody here knows the program of this problem
543212345
5432 2345
543 345
54 45
5 5

pranav kumar - September 20, 2011 at 4:35 PM

hi...
i need code to print
0 100
1 99
2 98
.
.
.
.
100 0
99 1
98 2
....
in an infinite loop
using single loop and single variable......

pranav kumar - September 20, 2011 at 4:37 PM

hi...
i am pranav
i need the code to print
0 100
1 99
2 98
.
.
.
100 0
99 1
98 2
.
.
.
.
in an infinite loop using single loop and single variable.....

mohan - September 30, 2011 at 12:20 PM

i want like this code
---------1
---------22
--------333
--------4444

Saranraj - November 10, 2011 at 9:01 PM


public class pry {

public static void main(String[] args) {
int myLevel;
int i, j , k;

myLevel = 6;

for (i = 1; i <= myLevel; i++) {

for (k =1; k <= myLevel-i; k++)

System.out.print(" ");

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

System.out.print( "*");
for(int l=myLevel;l>k-1;l--)
System.out.print( "*");

System.out.println("");

}


}
}
OUTPUT:-
-------*
------***
-----*****
----*******
---*********
--***********


class h
{
public static void main(String[] args) {
int myLevel;
int i, j , k;
int x=1;
myLevel = 6;

for (i = 1; i <= myLevel; i++) {

for (k =1; k <= myLevel-i; k++)

System.out.print(" ");

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

System.out.print(x);
for(int l=myLevel;l>k-1;l--)
System.out.print(x);
x++;
System.out.println("");

}


}
}

OUTPUT:-

-------1
------222
-----33333
----4444444
---555555555
--66666666666

S.Tejeswar Rao - November 16, 2011 at 11:07 AM

I want the ans of

1
01
101
0101
10101

Anonymous - November 28, 2011 at 2:33 PM

public class Pyramid {

public static void main(String[] args) {
int n;
int i, k, a, m, j;
m = 6;
for (a = 1; a <= m; a++) {
for (i = 1; i < n; i++) {
System.out.print(" ");
}

for (k = 1; k <= a; k++) {

System.out.print(k);

}
for (j = k - 1; j > 1; j--) {
System.out.print(j - 1);
}

System.out.print("\n");
n = n - 1;

}

}
}


OUT PUT


1
121
12321
1234321
123454321
12345654321

Anonymous - December 15, 2011 at 9:29 AM

I want answer for the following output
1
1 1
1 1 1 1
1 1
1

Ezhumalai - December 16, 2011 at 8:38 PM

i want this output.if you known means please share with me

1
2 3
4 5 6
7 8 9 10

Ezhumalai - December 16, 2011 at 8:47 PM

i want this output.if you known means please share with me

1
2 3
4 5 6
7 8 9 10

Anonymous - January 10, 2012 at 8:19 PM

Hi i need a code for the following.


1
2 3 2
4 5 6 5 4
7 8 9 10 9 8 7

Anonymous - January 16, 2012 at 1:57 PM

I want the code for the following program:
1 :sum = 1
1 2 :sum =3
1 2 3 : sum = 6
1 2 3 4 :sum =10
.
.
.
.

Naresh - February 4, 2012 at 10:10 PM

hi..
Can anyone give me code for below output...??
A
A B A
A B C B A
A B C D C B A
A B C D E D C B A

Naresh - February 4, 2012 at 10:11 PM

hi..
Can anyone give me code for below output...??
A
A B A
A B C B A
A B C D C B A
A B C D E D C B A

Sanmay Mukherjee - February 13, 2012 at 8:36 AM

I wany an out put of
*
**
***
****
*****

Anonymous - February 16, 2012 at 10:23 AM

how to print the following triangle?
1
23
456
79-----91

Anonymous - February 28, 2012 at 7:20 PM

hi to all can you help me with this program, i need a code that diplays a pyramid of asterisk.. using only the integer row and column please help needed badly.

Anonymous - February 28, 2012 at 9:34 PM

public static void main(String[] args) {
int i,j,k;

for (i = 0; i < 5; i++) {
for (j = 0; j < 5-i; j++)
System.out.print(" ");
for(k=j; k<=5; k++){
System.out.print("*");
System.out.print(" ");}
System.out.println();
}


}
}
output:
*
* *
* * *
* * * *
* * * * *

Anonymous - February 28, 2012 at 10:40 PM

public static void main(String[] args) {
int i,j,k;

for (i = 0; i < 5; i++) {
for (j = 0; j < 5-i; j++)
System.out.print(" ");
for(k=j; k<=5; k++){
System.out.print("*");
System.out.print(" ");}
System.out.println();
}


}
}
output:
*
* *
* * *
* * * *
* * * * *

Muni - March 9, 2012 at 6:16 PM

* *
*** ***
***********
i want this code

nirdosh - March 16, 2012 at 1:21 PM

Code for
1
1 2
1 2 3
1 2 3 4 :

Code:

public class Pramid_test1 {
public static void main(String[] args) {
int noOfRows = 10;
for(int i = 1; i < noOfRows;i++)
{
for(int j = 1; j <= i; j++)
{
System.out.print(j+" ");
}
System.out.println();
}
}
}

nirdosh - March 16, 2012 at 1:22 PM

Solution For:
1
1 2
1 2 3
1 2 3 4

public class Pramid_test1 {
public static void main(String[] args) {
int noOfRows = 10;
for(int i = 1; i < noOfRows;i++)
{
for(int j = 1; j <= i; j++)
{
System.out.print(j+" ");
}
System.out.println();
}
}
}

nirdosh - March 16, 2012 at 1:23 PM

Solution For:
1
12
123
12
1

public class Pyramid_test2 {
public static void main(String[] args) {
int noOfRows = 9;
double center = Math.ceil((Double)(noOfRows+0.0)/2);
for (int i = 1; i <= noOfRows; i++) {
int j = 1;
while(j <= i) {
if(j <= center)
{
System.out.print(j);
if(j == center)
{
center = center - 1;
}
j++;
}
else
{
break;
}
}
System.out.println();
}

}

}

nirdosh - March 16, 2012 at 1:24 PM

Solution for:
1
121
12321
1234321
123454321
12345654321
123454321
1234321
12321
121
1

public class Pyramid_test3 {
public static void main(String[] args) {
int noOfRows = 9;
double center = Math.ceil((Double)(noOfRows+0.0)/2);
for (int i = 1; i <= noOfRows; i++) {
int j = 1;
while(j <= i) {
if(j <= center)
{
System.out.print(j);
if(j == center || j == i)
{
for(int k=j-1; k>=1;k--)
{
System.out.print(k);
}
if(j == center)
{
center = center - 1;
}
}
j++;
}
else
{
break;
}
}
System.out.println();
}

}

}

nirdosh - March 16, 2012 at 1:24 PM

Solution For:

1
1 2 1
1 2 4 2 1
1 2 4 8 4 2 1
1 2 4 8 16 8 4 2 1
1 2 4 8 16 32 16 8 4 2 1

public class Pyramid_test4 {
public static void main(String[] args) {
int noOfRows = 7;
for (int i = 1; i <= noOfRows; i++) {
int pr = 1;
for(int j = 1; j < 2*i; j+=2)
{
System.out.print(pr+" ");
if(j == 2*i - 1)
{
int rep = pr/2;
for(int k=j-1; k >=1; k-=2)
{
System.out.print(rep+" ");
rep/=2;
}
}
pr*=2;
}
System.out.println();
}

}

}

Anonymous - March 24, 2012 at 6:11 PM

i want the answer for
*
* *
* * *
* * * *
* * *
* *
*

Anonymous - March 24, 2012 at 6:11 PM

i want the answer for
*
* *
* * *
* * * *
* * *
* *
*

Chetan - April 3, 2012 at 3:59 PM

this is very nice question

Knight - April 13, 2012 at 4:28 PM

want the Code For
w w w w
w w w w w w
w w w

Anonymous - May 2, 2012 at 5:23 AM

I need the code for an upside down * triangle. So far I came up with the program to do it right side up.
***********

*********

*******

*****

***

*

deepak reddy - May 9, 2012 at 11:26 AM

...
how can i get this result frmo a java program??
1
1 1
1 2 2 1
1 3 4 3 1
1 4 7 7 4 1

deepak reddy - May 9, 2012 at 11:29 AM

iwant code for d given program
1
1 1
1 2 2 1
1 3 4 3 1
1 4 7 7 4 1

Anonymous - June 19, 2012 at 6:30 PM

How can i get this? Thanks for help (without (-) in this picture :))

----|
---*|*
--**|**
-***|***
****|****

Anonymous - June 19, 2012 at 10:03 PM

How could i write this, that only tvo lines and rows are written with stars and in the middle it shoul be empty space. (it is square a by b, or just a)

*******
*******
** **
** **
*******
*******

a= length
b= height

Unknown - July 1, 2012 at 2:40 PM

*
* * *
* * * * *
* * *
*


Plz help me

Anonymous - July 10, 2012 at 3:38 PM

package basics;

public class Demo5
{
public static void main(String a[])
{
int i,j,cnt=1,check=0;
for(i=1;i<=10;i++)
{
System.out.print(i);
check++;
if(check==cnt)
{
System.out.println();
cnt++;
check=0;
}
}


}

}

Anonymous - July 17, 2012 at 3:41 PM

if i am creating a pyramid like

*
* * *
* * * * *

Anonymous - July 17, 2012 at 11:02 PM

* *
* *
* *
*
* *
* *
* *


pleas try this i can not done this in c or java...

Anonymous - July 21, 2012 at 6:10 PM

I want to print star like shown below

* * * *
* * *
* *
*
can you please help me as soon as possible before monday,thnks

Anonymous - July 21, 2012 at 6:14 PM

I want output like this
* * * *
* * *
* *
*

please ,please help me

Anonymous - July 21, 2012 at 6:17 PM

i want output like this
* * * *
* * *
* *
*

please help me,thank you

Unknown - July 21, 2012 at 10:23 PM

1234321
123 321
12 21
1 1
please,give me this pattern in java

Unknown - July 21, 2012 at 10:25 PM

1234321
123 321
12 21
1 1
please,give me this pattern in java

Unknown - July 21, 2012 at 10:25 PM

1234321
123 321
12 21
1 1
please,give me this pattern in java

Unknown - July 26, 2012 at 2:04 PM

can anyone solve for this
INPUT : 1WshT%&Dsd
OUTPUT: DSd&%tHSw1

reverse then my problem is how to solve the uppercase-lowercase logic
U-U-L-L-U-L-U-U-L-L
WHERE: U = UPPER & L = LOWER

Unknown - July 26, 2012 at 2:05 PM

can anyone solve for this
INPUT : 1WshT%&Dsd
OUTPUT: DSd&%tHSw1

reverse then my problem is how to solve the uppercase-lowercase logic
U-U-L-L-U-L-U-U-L-L
WHERE: U = UPPER & L = LOWER

Unknown - July 26, 2012 at 2:06 PM

can anyone solve for this
INPUT : 1WshT%&Dsd
OUTPUT: DSd&%tHSw1

reverse then my problem is how to solve the uppercase-lowercase logic
U-U-L-L-U-L-U-U-L-L
WHERE: U = UPPER & L = LOWER

Unknown - July 26, 2012 at 2:06 PM

can anyone solve for this
INPUT : 1WshT%&Dsd
OUTPUT: DSd&%tHSw1

reverse then my problem is how to solve the uppercase-lowercase logic
U-U-L-L-U-L-U-U-L-L
WHERE: U = UPPER & L = LOWER

Unknown - July 28, 2012 at 12:23 PM

I want the answer like below..thanks in advance
1
123
12345
1234567
123456789

Anonymous - July 29, 2012 at 1:50 PM

can sm1 help me with dis:
abcddcba
abc cba
ab ba
a a
ab ba
abc cba
abcddcba

Anonymous - July 29, 2012 at 1:57 PM

can sm1 help me wid dis:
abcddcba
abc<>cba
ab<><>ba
a<><><>a
ab<><>ba
abc<>cba
abcddcba

Janardhan Naidu - August 7, 2012 at 4:46 PM

hi please help me.I want following output
String str ="WELCOME";
C
E L O
W E L O M

Janardhan Naidu - August 7, 2012 at 4:48 PM

Please help me
I want following output
String str="WELCOME";
O/P:
C
L C O
E L C O M
W E L C O M E

jani - August 8, 2012 at 1:11 AM

String str = "WELCOME";
I WANT O/P LIKE
C
L C O
E L C O M
W E L C O M E

plz help me advance in thanks

saloni dhawan - August 12, 2012 at 3:02 PM

Hiee plz help me to find the code of
1
4 2
3 3 3
4 4 4 4

saloni dhawan - August 12, 2012 at 3:03 PM

Hiee plz help me to find code of:
1
4 2
3 3 3
4 4 4 4

Anonymous - August 14, 2012 at 9:35 AM

hi! can somebody help me? can someone teach me the code for this output..

123454321
1234321
12321
121
1

Unknown - August 14, 2012 at 9:40 AM

hi! can someone help me with this output??

123454321
1234321
12321
121
1

thank you in advance....

Deepak Rai - August 21, 2012 at 8:20 PM

* * * * * * *
* * * s * * *
* * s s s * *
* s s s s s *

how to print this

Anonymous - September 10, 2012 at 2:19 PM

Plz can sm1 help me with this
***********
***** *****
**** ****
*** ***
** **
* *
** **
*** ***
**** ****
***** *****
***********

Unknown - September 13, 2012 at 2:23 PM

54321
5432
543
54
5
i want this type of program

Unknown - September 13, 2012 at 2:24 PM

54321
5432
543
54
5
i want this type of program

SHREYAS - September 20, 2012 at 4:02 PM

hi im shreyas
i need a program for:-
1
121
12321
1234321
123454321

using nested for loop
please somebody help me.

SHREYAS - September 20, 2012 at 4:03 PM

hi im shreyas
i needa program for:-

1
121
12321
1234321
123454321

USING NESTED FOR LOOP.

PLZ SOMEONE HELP ME.

SHREYAS - September 20, 2012 at 4:04 PM

hi im shreyas
i needa program for:-

1
121
12321
1234321
123454321

USING NESTED FOR LOOP.

PLZ SOMEONE HELP ME.

ayush - September 22, 2012 at 4:53 PM

i want a code for
1
21
321
4321
54321

ayush - September 22, 2012 at 4:53 PM

i want a code for
1
21
321
4321
54321

Anonymous - September 23, 2012 at 12:20 PM

What is the java code for this one ?
P
*R
**O
***G
****R
*****A
******M
*******M
********I
*********N
**********G

Anonymous - September 24, 2012 at 10:42 AM

ans. for this
0 0
2 4 1 3
6 8 10 5 7 9
12 14 16 18 11 13 15 17

Sarah Mahmassani - October 6, 2012 at 6:27 PM

can someone tell me the code of this:
1
22
333
4444
55555

Sarah Mahmassani - October 6, 2012 at 6:27 PM

can someone tell me the program of this:
1
22
333
4444
55555

Post a Comment