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




Have Programming Question? Ask it here!
 
 
 


Faisal Ansari
Counting
1 Answer(s)      3 years and 2 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 Objects Clandestinely - Java Tutorials
Counting Objects Clandestinely 2001-12-28 The Java Specialists' Newsletter [Issue 038b] - Counting Objects Clandestinely - Follow-up Author: Dr. Heinz M... that made me realise that a follow-up article would be appropriate: Q: Why do
Counting Objects Clandestinely - Java Tutorials
Counting Objects Clandestinely 2001-12-28 The Java Specialists' Newsletter [Issue 038a] - Counting Objects Clandestinely Author: Dr. Heinz M. Kabutz... Java programmers ;-). Counting Objects Clandestinely A few months ago I
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 bytes on Sockets,java tutorial,java tutorials
Counting bytes on Sockets 2002-10-09 The Java Specialists' Newsletter [Issue 058] - Counting bytes on Sockets Author: Dr. Heinz M. Kabutz If you.... Counting bytes on Sockets Background At the end of 2001, William Grosso
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
hi....
hi....  plzz sent me d code for counting vowels in a string... gui programme
STRING.....
STRING.....  plzz sent me d code for counting vowels in a string... gui programme
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
servlet
servlet  i want a program for counting the no of times the servlet has been invoked
JAVA - Java Interview Questions
JAVA  WAP TO PRINT COUNTING FROM WITHOUT USING ANY LOOP.  Hi Friend, Please clarify your problem. Thanks
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
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
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
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 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
Session Modification
Session Modification in PHP Session modification can be done through incrementing the loop. As the counting of loop increments, the session be modified.  First of all, begin the session with session_start(),  set the input
PHP Resource Associates
PHP Resource Type: In PHP, resource is a special type of variable. Main task of this variable is to hold a reference to an external resource like   connection to database, a file etc. In PHP 4's Zend Engine a reference counting
JAVA - Java Beginners
, visit the following link: http://www.roseindia.net/javatutorials/counting
java programming - Java Beginners
java programming  I want the java code for counting reapeted numbers.   Hi Friend, Try the following code: import java.util.*; class CountRepeatedNumber { public static void main(String[] args) throws
Calculate Month Difference in mysql - SQL
Calculate Month Difference in mysql  hi , i am rahul.Can anybody plz help me.i am calculating month difference in mysql5.0 procedure . i have done coding for it. it's counting difference between months. but what i want
jsp or sevlet and html form to send picture to database - JSP-Servlet
through to the database. Please I'm counting on you guys. Thanks to you all. 
java
-daemon, it finishes its job to the end (counting from 10 to 1
'for' Loop
to the while statement, but it is often easier to use if you are counting... - Counting doubled characters This code will look at each character in a string... expect. The for loop is better when you are counting something. If you are doing
JDBC: Rows Count Example
of rows in a table using JDBC API. Counting number of rows - To count... are counting the number of rows of student table. package jdbc; import...(); // counting rows String sql = "SELECT count(*) FROM student"; rs
java programming - Java Beginners
java programming  asking for java code .. counting for how many times the character is being entered in phrase like for instance.. input: learning is best output: a -- 1 b -- 1 e -- 2 i -- 2 n -- 2 l -- 1 s -- 1 t
The strpos() function
counting it is at 7th place
Hibernate Criteria Count Distinct
=criteria.list(); An Example of counting distinct record in an application
Credit Card Validation - Java Beginners
: If the digit has an odd position, counting from the right, add it to the sum as-is. Thus, the first, third, etc. digits (counting from the right) are all added directly
PHP array count
The PHP array_count_values() function is used to count the elements in the array. It returns the number of counting with values in associative array form. In returned array, key is the array's values and values are the number
java programming - Java Beginners
1,1,1,2,2,2,3,3,4,4,5,6,6,6,7,7 ..the output should be like this and counting how many times the number
Hibernate generation Id to postgreSQL
Hibernate generation Id to postgreSQL  Hi, I'm trying to implement a id generator in Hibernate, but I'm having a problem. Hibernate doesn't seems to reset the counting when the id is generated. For example: 1 - In PostgreSQL I
Java : Length of String
of str : " + count); /* Another way of counting length of String */ int i = 0
Advertisements
 

 

 

DMCA.com