Numbers pyramid

Numbers pyramid

Hi sir, Can you please tell me how to output this using nested for loops?

1 2, 1 1, 2, 3 4, 3, 2, 1 1, 2, 3, 4, 5 6, 5, 4, 3, 2, 1 1, 2, 3, 4, 5, 6, 7 8, 7, 6, 5, 4, 3, 2, 1 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 9, 8, 7, 6, 5, 4, 3, 2, 1

View Answers

September 7, 2012 at 6:43 AM

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, 4, 5, 6, 7
(Start a new line)8, 7, 6, 5, 4, 3, 2, 1
(Start a new line)1, 2, 3, 4, 5, 6, 7, 8, 9
(Start a new line)10, 9, 8, 7, 6, 5, 4, 3, 2, 1









Related Tutorials/Questions & Answers:
Numbers pyramid
Numbers pyramid  Hi sir, Can you please tell me how to output this using nested for loops? 1 2, 1 1, 2, 3 4, 3, 2, 1 1, 2, 3, 4, 5 6, 5, 4, 3, 2, 1 1, 2, 3, 4, 5, 6, 7 8, 7, 6, 5, 4, 3, 2, 1 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 9, 8
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
Advertisements
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
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
pyramid  hi frnds i need java code for pyramid. the pyramid look like this A BAB CBABC BAB
pyramid
pyramid  hi i need java code for pyramid. the pyramid look like this. A BAB CBABC BAB
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
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 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
print numbers in traingle shape
print numbers in traingle shape  1 22 333 4444 i want output like this please help me   class Pyramid { public static void main(String[] args) { for(int i=1;i<=4;i++){ for(int j=1;j<
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
automorphic numbers
automorphic numbers  how to find automorphic number in java   Hi Friend, Pleas visit the following link:ADS_TO_REPLACE_1 Automorphic numbers Thanks
sorting numbers
sorting numbers  How to sort the numbers in ascending order   import java.util.*; class SortNumbers{ public static void main(String...=input.nextInt(); list.add(num); } System.out.println("Numbers
numbers
Prime Numbers
Prime Numbers  Create a complete Java program that allows the user to enter a positive integer n, and which then creates and populates an int array with the first n prime numbers. Your program should then display the contents
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
Pyramid
pyramid
pyramid
pyramid
pyramid
Rational Numbers
Rational Numbers   Write and fully test a class that represents rational numbers. A rational number can be represented as the ratio of two integer values, a and b, where b is not zero. The class has attributes for the numerator
ModuleNotFoundError: No module named 'pyramid'
ModuleNotFoundError: No module named 'pyramid'  Hi, My Python... 'pyramid' How to remove the ModuleNotFoundError: No module named 'pyramid... to install padas library. You can install pyramid python with following command
Listing all even numbers between two numbers
Listing all even numbers between two numbers  Hi, How to write code to list all the even numbers between two given numbers? Thanks   Hi, You function will take 2 numbers and the find the even numbers between
how to add to numbers in java
how to add to numbers in java  how to add to numbers in java
Hexadecimal numbers multiplication
Hexadecimal numbers multiplication  Sir, I have to multiply 128 bit hexadecimal numbers. Do u have any logic for this?? The numbers are like ab7564fa342b5412c34d9e67ab341b58
Addition of two numbers
Addition of two numbers  addition of two numbers
nmber printed in pyramid format
nmber printed in pyramid format  how to print this format using java 1 23 345 4567 56789
defining numbers in Java Script
defining numbers in Java Script  Explain about defining numbers in Java Script
ModuleNotFoundError: No module named 'numbers'
ModuleNotFoundError: No module named 'numbers'  Hi, My Python... 'numbers' How to remove the ModuleNotFoundError: No module named 'numbers... to install padas library. You can install numbers python with following command
multiply of 100 digits numbers
multiply of 100 digits numbers  multiplying 100 digits numbers to eachother
numbers divisible by 5 and 6
numbers divisible by 5 and 6  Find the first ten numbers which are greater than Long.MAX_VALUE divisible by 5 and 6
prime numbers - Java Beginners
prime numbers  Write a java program to find the prime numbers between n and m
Adding two numbers
Adding two numbers  Accepting value ffrom the keyboard and adding two numbers
Generate Random Numbers
Generate Random Numbers  hi,,, Please give me answer with example How do you generate random numbers within a given limit with actionscript... This function generate random numbers with in given limit
random numbers - Java Beginners
random numbers  write a program to accept 50 numbers and display 5 numbers randomly  Hi Friend, Try the following code: import...); System.out.println("Enter 10 numbers: "); for(int i=0;i<10;i
odd numbers with loop
odd numbers with loop  get the odd numbers till 100 with for,while loop   Java find odd numbers: class OddNumbers { public static void main(String[] args) { for(int i=1;i<=100;i
ModuleNotFoundError: No module named 'anyblok_pyramid'
ModuleNotFoundError: No module named 'anyblok_pyramid'  Hi, My... named 'anyblok_pyramid' How to remove the ModuleNotFoundError: No module named 'anyblok_pyramid' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'launchkey-pyramid'
ModuleNotFoundError: No module named 'launchkey-pyramid'  Hi, My... named 'launchkey-pyramid' How to remove the ModuleNotFoundError: No module named 'launchkey-pyramid' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'minty-pyramid'
ModuleNotFoundError: No module named 'minty-pyramid'  Hi, My... 'minty-pyramid' How to remove the ModuleNotFoundError: No module named 'minty-pyramid' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'opbeat_pyramid'
ModuleNotFoundError: No module named 'opbeat_pyramid'  Hi, My... named 'opbeat_pyramid' How to remove the ModuleNotFoundError: No module named 'opbeat_pyramid' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pyramid_addons'
ModuleNotFoundError: No module named 'pyramid_addons'  Hi, My... named 'pyramid_addons' How to remove the ModuleNotFoundError: No module named 'pyramid_addons' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pyramid_admin'
ModuleNotFoundError: No module named 'pyramid_admin'  Hi, My... 'pyramid_admin' How to remove the ModuleNotFoundError: No module named 'pyramid_admin' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pyramid_cachebust'
ModuleNotFoundError: No module named 'pyramid_cachebust'  Hi, My... named 'pyramid_cachebust' How to remove the ModuleNotFoundError: No module named 'pyramid_cachebust' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'pyramid_caching'
ModuleNotFoundError: No module named 'pyramid_caching'  Hi, My... named 'pyramid_caching' How to remove the ModuleNotFoundError: No module named 'pyramid_caching' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pyramid-captcha'
ModuleNotFoundError: No module named 'pyramid-captcha'  Hi, My... named 'pyramid-captcha' How to remove the ModuleNotFoundError: No module named 'pyramid-captcha' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pyramid_cas'
ModuleNotFoundError: No module named 'pyramid_cas'  Hi, My Python... 'pyramid_cas' How to remove the ModuleNotFoundError: No module named 'pyramid_cas' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'pyramid_cli'
ModuleNotFoundError: No module named 'pyramid_cli'  Hi, My Python... 'pyramid_cli' How to remove the ModuleNotFoundError: No module named 'pyramid_cli' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'pyramid_closure'
ModuleNotFoundError: No module named 'pyramid_closure'  Hi, My... named 'pyramid_closure' How to remove the ModuleNotFoundError: No module named 'pyramid_closure' error? Thanks   Hi, In your python

Ads