How to Get this Output

How to Get this Output

1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1

View Answers

October 21, 2012 at 1:39 AM

Done It

public class star { public static void main(String[] args) { for(int i=1;i<=5;i++) { for(int j=1;j<=i;j++) { System.out.print(j + " "); } System.out.println(); } for (int i = 5; i >= 1; i--) { for (int j = 1;j<=i;j++) { System.out.print(j+" "); } System.out.println(); }
} }









Related Tutorials/Questions & Answers:
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
Advertisements
How to Get this Output
How to Get this Output  1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1   Done It public class star { public static void main(String[] args) { for(int i=1;i<=5;i
How to get Output for a Bean problem
How to get Output for a Bean problem  Hello Kindly tell me a simple Program on Bean to get the Output using JSP code
How to compile & get output for JSP
How to compile & get output for JSP  HI My Roseindia friend has given the answer as RUN the JSP How to run the JSP Program? But what i mean is that i... the said above one. So Kinly tell me the solution how to get the output
How to get the output of jsp program using Bean
How to get the output of jsp program using Bean  Hello my Roseindia... the ouput.i want the output of the program .i posted the same program below so... already did that one. Now i want the output of the program ,so please tell me
How to get the output of JSP program using Bean
How to get the output of JSP program using Bean  Hi Kindly go through a simple program below and give the solution for the said below one... want the output of the program ,so please tell me the Solution  Please
how can i get output pls urget tell me
how can i get output pls urget tell me  HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception
how to write code for this output?
how to write code for this output?   1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
output
output  Sir,I am experiencing some problems with the output of this program.I got some useful help this website,but the output of the program isn't producing what it should.let me explain the output below is what happen when
How to capture output from console into textarea in java?
How to capture output from console into textarea in java?  Hi, I would like to know how can we display the result of a program in java into a textarea instead of displaying it on console. Thanks
How to print the following output using c program
How to print the following output using c program  1) 4 3 4 2 3 4 1 2 3 4 2) A B C D E F G H I J
how to display the output of the newly created excel file
how to display the output of the newly created excel file  the following program will create the test.xlsx file, how can i display the content of the test.xlsx file in the web browser? thanks, %@ page import
how to sort the elements of hashmap and to print output the key and the value attached to it
how to sort the elements of hashmap and to print output the key and the value attached to it  how to sort the elements of hashmap and to print output the key and the value attached
i want to type the intput in the output console box how?
i want to type the intput in the output console box how?  i want to type the intput in the output console box how
How many ways we can give the output to a browser?
How many ways we can give the output to a browser?  How many ways we can give the output to a browser
triangle output
triangle output  program to get the following output
can we use scanner class,class , object and methods to get output without using constructor ????
can we use scanner class,class , object and methods to get output without using constructor ????  im getting error here..i hav used scanner class... am i getting error here... can we get output using scanner class , object
How to get the Day name
How to get the Day name  Hi, I am a beginner in Java and new... of upcoming Monday. expample 1: If DateString = 17/02/2015 (Tuesday) then Output...) then output Date = 23/02/2015 (Monday). expample 3: If DateString = 23/02/2015
How can I output text typed in textarea by user on the same page?
How can I output text typed in textarea by user on the same page?  I have a basic HTML page where I have created a textarea for users comments. I would like to take the comments and append them to the same page for all to see
triangle output
triangle output  program to get the following output: * *   Hi Friend, Please specify the pattern properly.ADS_TO_REPLACE_1 Thanks
XSLT Output Types
; } Output Types The xsl:output element lets you specify how to generate result output. Although it is not required to specify the type of output but an XSLT... of the output element.  The xsl:output element is a top-level element
Java Redirect output to file
Java Redirect output to file This section illustrates you how to redirect the output to the file. It may be comfortable to a programmer if they are able... to the file. In the given example, we have set the output stream of System
Output of flex
Output of flex  hi....... please provide the name of the output file. What is the output of flex applications? please rply ASAP........ Thanks
output variable
output variable  if i want to print output of three variables when i wrote the code e.g SYStem.out.PRINTln(answer + answer1 + answer 2) only output of answer is getting printed out? can you help
input output
Input And Output       Introduction The Java I/O means Java Input/Output and is a part... used for writes byte to output stream. It implements a buffered output
How to get Button Id ?
How to get Button Id ?  How to get Button ID instead of its value in Servlet. (I am not using jsp right now
how to get radio value
how to get radio value    how to retrive the option value and insert the next table pls give example
How to ensure the same output by java code on 32 bit m/c and 64 bit m/c
How to ensure the same output by java code on 32 bit m/c and 64 bit m/c  How to ensure the same output by java code on 32 bit m/c and 64 bit m/c
How to get project path
How to get project path  my problem is,i have one jar file,in that one xml is their,i am adding this jar file to my project,my question is how i can open or get that xml path
How to get project path
How to get project path  my problem is,i have one jar file,in that one xml is their,i am adding this jar file to my project,my question is how i can open or get that xml path
What is the output if....
What is the output if....  Here is my code. what is the output...;When we put 50 as a lower limit value, output comes: (adsbygoogle... violation. After the catch block When we put 150 as a lower limit value, output
What will be the Output?
What will be the Output?  int[] number = {5,3,6,10,1} int temp; for (int i=0; inumbers[j]) { temp=numbers[i]; numbers[i]=numbers[j] number[j]=temp
output of the program
output of the program  public static int sum(List list) { int sum = 0; for ( Iterator iter = list.iterator(); iter.hasNext(); ) { int i = ((Integer)iter.next()).intValue(); sum += i; } return sum
How to get Java SDK
How to get Java SDK  Hi, I have purchased a new computer and installed windows 7. Now I have to get the Java SDK and install on my computer for developing and testing Java programs. So, can anyone tell me How to get Java SDK
how to get UIView by tag
how to get UIView by tag  In IOS application how to get a view by the tag id? Thanks   Hi, You can get this with the help of the function 'viewWithTag''. Following example code is getting the UILabel object from
xml output
xml output  generate an xml output in the following format <FileCount> <DOC>AA <RTF>BB <PDF>CC <Total>DD where AA=total number of .DOC files found BB=total number of .RTF files found,etc
output error
output error  this is my program import java.io.*; public class separate { public static void main(String[] args)throws IOException...]; for (k=0;k } } if i enter "my name" as the input the output
displaying output on web page immediately whent the jsp buffer size is full. And how to set jsp buffer size in bytes
displaying output on web page immediately whent the jsp buffer size is full. And how to set jsp buffer size in bytes  Here is my requirement, I have to display output on the browser after jsp buffer is full. And I have to set
what is the output?
what is the output?  public class MyAr{ public static void main(String argv[]) { int[] i=new int[5]; System.out.println(i[5]); } }   It gives ArrayIndexOutOfBoundsException as you haven't add element to array. Correct
what will the output
= (Parent) sonu; p.play(); What will be the output of above section of code
How to get factorial in mysql
How to get factorial in mysql  Hi, In order to improve the speed of my queries, one in particular tries to find matches between multiple tables, I am trying to use prime numbers to speed the process, but I have been googling
how to get following answer in turbo c program
how to get following answer in turbo c program  input 123456789 output 1 2 3 4 5 6 7 8 9
output using SQL
output using SQL  how to get ( 15 march 2011) and (15/03/2011) output using SQL   Use the following queries to get the data from database in the given format. For (15 march 2011) format: SELECT DATE_FORMAT(dob, '%d
How to get involved
How to get involved       Shopping cart application gives you many opportunities... Application Report bugs and request features and enhancement Get familiar
How to get data datagrid ?
How to get data datagrid ?  How to get data datagrid in jsp from arrayList in java? Code in java CategoryDao dao = new CategoryDao(); ArrayList<Categories> lstCategory = new ArrayList<Categories>
ModuleNotFoundError: No module named 'output'
'output' How to remove the ModuleNotFoundError: No module named 'output'...ModuleNotFoundError: No module named 'output'  Hi, My Python... to install padas library. You can install output python with following command
How to get the position of the comments in the pdf
How to get the position of the comments in the pdf  how to get the postion of comments, in the extracted xml, from pdf
How to get the position of the comments in the pdf
How to get the position of the comments in the pdf  how to get the postion of comments, in the extracted xml, from pdf
How to use Hibernate get sessionfactory?
How to use Hibernate get sessionfactory?  Hi, How to use hibernate get sessionfactory? Thanks

Ads