Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


asrar_humaira
start pyramid
1 Answer(s)      3 years and 11 months ago
Posted in : Java Beginners


how to make program use loop to make the output become like this;

* **








** *


Advertisement
View Answers

November 3, 2010 at 11:31 AM


import java.lang.*;

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

int k,i,j,p=4; for(i=1;i<5;i++) { for(k=0;k

        }

System.out.print("\n");
p--;
}

} }



Related Tutorials/Questions & Answers:
start pyramid
start pyramid  how to make program use loop to make the output become like this; * ** ** *   import java.lang.*; class Star { public static void main(String args[]) { int k,i,j,p=4; for(i=1;i<5;i
pyramid
pyramid  hi frnds i need java code for pyramid. the pyramid look like this A BAB CBABC BAB
Advertisements
pyramid
pyramid  hi i need java code for pyramid. the pyramid look like this. A BAB CBABC BAB
pyramid
pyramid  how to print 1 22 333 4444 55555   class Pyramid { public static void main(String[] args) { for(int i=1;i<=5;i++){ for(int j=1;j<=i;j++){ System.out.print(i
pyramid
pyramid  How to get the code for the following pattern * * * * * * * * * *   class Pyramid{ public static void main(String args[]){ for(int i=1;i<=4;i
pyramid
pyramid  How to get the code for the following pattern * * * * * * * * * *   class Pyramid{ public static void main(String args[]){ for(int i=1;i<=4;i
pyramid
pyramid  how to get the output like this A BB CCC DDDD   Hi Friend, Try the following code: class Pyramid { public static void main(String[] args) { for(char ch1='A';ch1<='D';ch1
number pyramid
;class Pyramid{ public static void main(String args[]){ for(int i=1;i<=7...; class Pyramid{ public static void main(String args[]){ for(int i
Number Pyramid
for the following number pyramid: print.... So far I have this: print("import java.util.Scanner; class Pyramid { public... Pyramid { public static void main(String[] args) { Scanner input = new Scanner
Numbers pyramid
, 7, 6, 5, 4, 3, 2, 1   Sorry the correct way i need is, 1 (Start a new line)2, 1 (Start a new line)1, 2, 3 (Start a new line)4, 3, 2, 1 (Start a new line)1, 2, 3, 4, 5 (Start a new line)6, 5, 4, 3, 2, 1 (Start a new line)1, 2, 3
nmber printed in pyramid format
nmber printed in pyramid format  how to print this format using java 1 23 345 4567 56789
Application for print pyramid of numbers
Application for print pyramid of numbers  What is the code for printing the numbers like 1 1 1 1 2 2 1 1 3 4 3 1 1 4 7 7 4 1
Java Pyramid of Numbers
Java Pyramid of Numbers  Hi, I want to know how the code to print the pyramid below works. It uses nested for loops. Pyramid: 1 2 1 2
PYRAMID - Java Beginners
will display triangle or pyramid... The user must choose A, B, or C...: A (so it will display a Pyramid OR TRIANGLE) would you like to continue y... OR PYRAMID NOTE: SORY I TRY TO DRAW A PYRAMID OR TRIANGLE BUT IT WILL NOT DISPLAY
start and deploy
start and deploy  how to deployee java web application in glassfish by using netbeans6.7
obj_start()
obj_start()  hii, What is the use of obj_start()?   hello, Its initializing the object buffer, so that the whole page will be first parsed and stored in output buffer so that after complete page is executed
Printing numbers in pyramid format - Java Beginners
Printing numbers in pyramid format  Q) Can you please tel me the code to print the numbers in the following format: 1... the following code: public class Pyramid{ public static void main (String
Pyramid Multiplex Online movie ticket booking
Pyramid Multiplex Online movie ticket booking  Pyramid multiplex.... Pyramid multiplex currently has 5 theatres now. Each theatre currently has... to browse through the movies running in Pyramid complex for any given date
how to make following pyramid using loop
how to make following pyramid using loop   1 212 32123 4321234 543212345 4321234 32123 212 1   Here is a code that displays the following pattern: 1 212 32123 4321234 543212345
Start MySQL on Linux
Start MySQL on Linux  hii, How can i start MySQL on Linux? is there any cmd for starting MySQL on linux?   hi, yeah , By typing this cmd you can start MySQL service mysqld start
could not start server. - EJB
could not start server.  Dear All I have installed netbeans 5.5.1 and sun java Application server 9.2 to run ejb program. But when I start... comes ---sun java server could not start. so what should I do to start this server
where to start - Java Beginners
where to start  Myself being a java beginner want to know wat is that I shall start practicing from the day one to make myself get the knowledge... on.   Hi, Thanks for using RoseIndia.net You can start learning java
illegal start of type
illegal start of type  Hi, This is my code i m getting illegal start of type as error when i m compiling it,can anyone pls help me to correct this error. public class WriteByteArrayToFile { public static void main(String
illegal start type, HELP!
illegal start type, HELP!  import java.util.Scanner; public class Lab6ex9 { public static void main(String[] args) { Scanner... is " + shipping + " dollars."); } } } Illegal start type error? help?   
Illegal Start of Type
Illegal Start of Type  Hello! I'm very new to writing java. And I keep getting the "Illegal Start of Type" error. I've tried everything to fix it. can anyone help me? import java.awt.Dimens; import java.awt.*; import
illegal start of type
illegal start of type  Hello! I'm very new to writing java. And I keep getting the "Illegal Start of Type" error. I've tried everything to fix it. can anyone help me? import java.awt.Dimens import java.awt.*; import javax.swing.
Advertisements
 

 

 

DMCA.com