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



Home Answers Viewqa Java-Beginners loop, control statements
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


nisha
loop, control statements
2 Answer(s)      3 years and 6 months ago
Posted in : Java Beginners


a java program to print

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

Advertisement
View Answers

March 31, 2011 at 3:26 PM


class Pyramid{
    public static void main(String[] args){
        int p = 6;
        for (int i = 0; i <= 6; i++) {
        for (int j = p; j>= 1; j-- )
        System.out.print(" ");
        p-=1;
        for (int k = 1; k <= i; k++)
        System.out.print ("*");
        System.out.println();
        }
            }
        }


February 10, 2013 at 8:26 PM


* * *


please print the output of this program.



Related Tutorials/Questions & Answers:
loop, control statements
loop, control statements  a java program to print
loop statements
loop statements  write a program that reads from input an interger n and prints the factorial of all numbers between 1 and n
Advertisements
Java Control Statements
Java Control Statements       Introduction to Control Statements In this section, we are going to discuss the control statements. Different types of control statements
loop, control structures
loop, control structures  a java program to print
Java Control Statements
statements. When i is greater than value 10 control comes out of loop and next... Java Control Statements     ... the control statements. Different types of control statements: the decision making
Control Flow Statements in java 7
Control Flow Statements in java 7 In this section we will discuss Control Flow Statements in java 7. This is one type of Language Fundamentals. Control.... So control flow statements break the flow of program and flow under some
java program using control statements...
java program using control statements...  public class ControlStatements { public static void main(String args[]){ int x=10; if(x==0){ System.out.println("It is zero"); else if(x>0) System.out.println
Use while loop in jsp code
Use while loop in jsp code       While loop is a control flow statement that works repeatedly based on a given boolean condition, loop will continuously execute
Looping Statements in java 7
Statements in java 7. This is one type of control flow statement. Looping...-while Loop : It is a control structure which is similar to while loop except... of the loop, so that the statements in the loop will get execute once before
Java Control Statement
the control to the next iteration of the loop. In other word this statements... : A for loop is a control structure that allow to execute code specific number... loop : A while loop is a control structure that allow you to execute a task
for loop
;condition;increment) { //statements } The "for" loop works as follows- when the program control enters the loop it first does the initialization part... the statements given inside the loop and then goes to increment part and increments
Branching Statements in java 7
Branching Statements in java 7 In this section, we will discuss about Branching Statements in java 7. This is one type of control flow statement. Branching.... Syntax : loop (...){ condition{ continue; } ......//statements } Return
do while loop
do while loop       In java a do while loop is a control flow statement that allows a certain code...-while loop:     do   {   statements;   
for loop in java example
.style1 { color: #0000FF; } for loop in java example We are going to discuss about for loop in java example. The for loop statement has type loop control statement. We first initialize the variable. After that check
Loop
to understand a loop my quesiton are: what du i do wrong in my code since its endless. i would like to control the "start" stop" and step from an object. (made in blueJ) Class Loop public void loopUpGeneral(int start, int stop
Mysql Loop in Procedure
Mysql Loop in Procedure       Loop in Procedure is a simple loop construct that enables an repeated execution of the statement list, which consists of one or more statements. Each
Decision-making Statements in java 7
Decision-making Statements in java 7. This is one type of control flow statement. Decision-making Statements : This kind of control statements is used where.... If Statement : If statement is one of the basic control flow statements
SQL Simple LOOP
that are executed repeatedly until it push the flow of control to outside of the loop... type to int. The Loop run repeatedly until it push the flow of control... SQL Simple LOOP      
loop
loop  i want to write my name(inder) through loop in java using star
loop
loop  what is the difference b/w do while,while and for loop..with example
For loop
For loop  Hi! Please explain the following loop: for(i=0;i<a[j];i++) THANX!!   Please reply as soon as possible
for loop
for loop  how to performs the for loop when 2 inputs given like displays the triangle shape and how to take initial values or declaration values plz explain in detailed ex. 1 12 123 1234
For Loop
For Loop  Write a program using a for loop that computes the following sum: 1/2 + 2/2 + 3/2 + 4/2 + 5/2 + ... N/2 N will be an integer limit the user enters. This is an example of my upcoming quiz. I need help on knowing
Until Loop In a Procedure
Until Loop In a Procedure       Until Loop In a Procedure is used to execute a set of statements repeatedly until a certain condition is reached. Understand with Example
for loop
for loop  using only two for loop how can print below numbers 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 6 6 6 6 6 6 5 5 5 5
for loop
for loop  using only two for loop how can print below numbers 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 6 6 6 6 6 6 5 5 5 5
loop
loop  strong textHello can someone help me with this problem,I need to output the following code using a loop the code is as follows with the user inputs in inverted commas,thanks. ENTER CODE(XX to Stop) CODE:"D24" QUANTITY:"2
Flow Control Constructs
; Flow Control Constructs include the IF, CASE, LOOP, WHILE, ITERATE... statements. These statements can repeat the execution until the loop is exited... Statements. ITERATE is used to iterate (Continue) the loop again. Example : 
predicates and statements?
predicates and statements?  Explain about predicates and statements
PHP Control Statement
PHP Control Statement The PHP Conditional statements helps us to perform different actions for different decisions. You can use conditional statements.... In the current tutorial - we'll study two control statements: If..else
Mysql Loop in Procedure
Mysql Loop in Procedure       Loop in Procedure is a simple loop construct that enables... statements.Each loop is terminated by a semicolon(;) or statement delimiter
Advertisements
 

 

 

DMCA.com