![]() |
|
| Java Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too. |
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member Join Date: Sep 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3 | i want a program to print a pyramid can you giv me the code for the pyramid program |
| | |
| | #2 (permalink) |
| Banned Join Date: Sep 2007 Age: 27
Posts: 87
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 0 | Re: i want a program to print a pyramid /* * Created on Nov 6, 2007 */ /** *@authorhttp://books4java.blogspot.com * *ProgramtoprintPyramid **/ publicclass Pyramid { publicstaticvoid main(String s[]) { int i, j; int count = 5; for (i = 0; i < 6; i++) { for (int k = 0; k < count; k++) { System.out.print(" "); } for (j = 0; j < 2 * i - 1; j++) { char c = '1'; System.out.print("*"); } System.out.println(" "); count--; } } } for Free Ebooks on Java,J2ee visit books4java.blogspot.com |
| | |
![]() |
| Tags |
| print , program , pyramid |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mega Free Download S/W Links A-Z | yathish | OTHERS | 516 | 21-03-09 10:06 AM |
| Program to print the command line arguments | jithendra.b | ds. c , c++ Interview / Technical Questions | 1 | 12-04-07 04:09 PM |
| Fresh College Graduates @ Microsoft India - Microsoft It Apex Program | sridhar | Fresher Jobs | 0 | 02-04-07 11:01 AM |
| Student Project Program - Microsoft Academic Project Program 2006-2007 | jasmine84 | Other Requirements | 0 | 26-01-07 07:47 PM |
| Plz hELP ME I NEED THE o/p of the following Program | ashirvad | DATA STRUCTURES, C, C++, VC ++ | 2 | 22-09-06 11:08 PM |
| More Interview Questions Here... |