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



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Faisal Ansari
Counting
1 Answer(s)      3 years and 8 months ago
Posted in : Java Beginners


Pl sir make a program which generate the following output on pop up menu. 1 12 123 1234 12345 123456 1234567 12345678 123456789


Advertisement
View Answers

February 24, 2011 at 11:13 AM


Java Print Pattern

1 
12 
123
1234
12345
123456
1234567
12345678
123456789

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


Related Tutorials/Questions & Answers:
letter counting for the smallest word
letter counting for the smallest word  How do I program my java program to only count the letters in the smallest of two words? this is what I have and it works EXCEPT that it counts all of the letters not just the smallest word
Advertisements
Counting specific word occurences in a file
Counting specific word occurences in a file  Hello I have a log file from the proxy which consists all the browsing history with date,time,url,ip address etc as fields.Now i need to take only main part of the url like the domain
counting the positive,negative and zero nos. - Java Beginners
counting the positive,negative and zero nos.  Create a program that will input n number, and determine the number of positive, negative
Counting the highest sequence of zeros and one's - Java Beginners
Counting the highest sequence of zeros and one's  Count the highest sequence value of '0's and '1's. for a given string with zeroes and ones. Input: You should ask user to enter any bit string with zeros and ones sequence
counting identifiers,no.of inputs and outputs - Java Magazine
counting identifiers,no.of inputs and outputs  Hi, my name is jyothi.iam doing my miniproject the title is 'evaluation of complexity measure using cognitive metrics'.actually i want to take the program as input and i want
counting the values in input file and and writing the output to a file
counting the values in input file and and writing the output to a file  Can any one please correct this code. This is to read a file and later it should write the output to a file. Input file has 20 rows and 4 columns. If we
Easy Counting Java Program...Please Help? - Java Beginners
Easy Counting Java Program...Please Help?  As I said, I am a beginner at Java. I came across this problem that Im sure uses java. Could you please tell me the code to do this and possibly explain? How many ways
Determining the Number of Days in a Month
Determining the Number of Days in a Month   This section will show the way of counting the number of days of a month in the specified year. Following program takes the year as input through the keyboard and shows the number of days
Hit Counter Servlet Example
Hit Counter Servlet Example       This example illustrates about counting how many times the servlet is accessed. When first time servlet (CounterServlet) runs then session is created
iPhone Development in 2009
iPhone Development in 2009       The iPhone, Apple Inc's latest gadget is already a craze worldwide with more than 15,000 applications designed for it and counting. The one big
Access Modifiers and Garbage Collection
-counting memory management system through retain and release keywords
Counter in Init() Method
and by reading the init parameter to know from where the counting will begin
Must to See Agra Fort
with it for more than 500 years and still counting. The Agra Red Fort resembles
servlet
servlet  i want a program for counting the no of times the servlet has been invoked
display co-occurrence words in a file
display co-occurrence words in a file  how to write java program for counting co occurred words in the file
display co-occurrence words in a file
display co-occurrence words in a file  how to write java program for counting co occurred words in the file
STRING.....
STRING.....  plzz sent me d code for counting vowels in a string... gui programme
hi....
hi....  plzz sent me d code for counting vowels in a string... gui programme
httpsession listener - JSP-Servlet
httpsession listener  i want to see the example of httpsession listener where it is counting how many times the session has been created
JAVA - Java Interview Questions
JAVA  WAP TO PRINT COUNTING FROM WITHOUT USING ANY LOOP.  Hi Friend, Please clarify your problem. Thanks
Loops
print the counting from 1 to n- numbers. Here N refers to limit from which the code will run. a. the variable $Counting = 1; b. print $ Counting; c. add 1 to $ Counting; d. go to sep a. and run this script again with the new value
j2ee - JDBC
J2EE - Counting the number of records in the table  Counting the number of records in the table J2EE  Hi,Are you trying to find the solution for counting the number of records in the table.Suppose you have student table
java - Java Beginners
java  write a programme for counting no. of words in a line of text using string tokeniser  Hi Friend, Use the following code: import java.util.*; public class CountWords{ public static void main(String[] args
PHP Array Count Values
); echo"Counting the number of values are:"; print_r(array_count_values...;Cup" } Counting the number of values are: Array ( [New] => 2...); echo"Counting the number of values are:"; print_r(array_count
PHP Concatenation Operator
will be: 22 It also includes the space and special character in counting the length... false; e.g. Counting the India string in Rose India string: <?php echo strpos
java
-daemon, it finishes its job to the end (counting from 10 to 1
Advertisements
 

 

 

DMCA.com