1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SOVA2 [1]
3 years ago
8

Write code which prints every number from 1 to 20 a number of times equal to the number itself (e.g. one 1, two 2's...). Every i

ndividual number printed should be separated by a space, and there should be a new line each time the number changes. You should use nested loops to produce your output (it will result in far less code).
Partial sample run:

1
2 2
3 3 3
........

Note: Java
Computers and Technology
1 answer:
Oksi-84 [34.3K]3 years ago
6 0

public class JavaApplication71 {

   

   public static void main(String[] args) {

       for (int i = 1; i <= 20; i++){

           for(int w = 0; w < i; w++){

               System.out.print(i+" ");

           }

           System.out.println("");

       }

   }

   

}

I hope this helps!

You might be interested in
Namecoin is an alternative blockchain technology that is used to implement decentralized version of Routing Banking System.A. Tr
vova2212 [387]

Answer:

False

Explanation:

Namecoin is a type of crypto currency which was originally pronged from Bitcoin software. It is coded in the fashion of Bitcoin with the same algorithm as well. Hence it is not a blockchain technology that is used to implement decentralized version of Routing Banking System. Namecoin can store data within its own blockchain transaction database.

4 0
3 years ago
What part of a computer is the most important?
Nikitich [7]
The CPU is the most important. It is the brains of the Computer.
3 0
3 years ago
Read 2 more answers
Does learning swift is hard? more than android?
ladessa [460]
No it is not. it's quite simple when you get the hang of it
4 0
3 years ago
What can be said about the equipment used by photographers during the Civil War?
lilavasa [31]
The answer is 1 and 4
6 0
2 years ago
Read 2 more answers
Wendell notices that the company's top executives share a belief that managers are directly responsible for the organization's s
Debora [2.8K]
This belief reflects an omnipotent view of management.
8 0
2 years ago
Other questions:
  • Once the technology for the collection of solar power is in place what will be two benefits of its use
    9·1 answer
  • You can double-click a window’s title bar to maximize the window. true false
    9·1 answer
  • Terms that represents the achual speed used by device to transfer data​
    14·1 answer
  • How should this be accomplished? Business users have requested that the Salesforce Administrator allow agents to view a list of
    6·1 answer
  • Biomimicry is the term used when engineers are inspired by objects found in nature? Group of answer choices True False
    10·1 answer
  • A CPU has 32 KB cache, 2-way set associative, 16-byte block size. How many bits are required to use index each set in this cache
    6·1 answer
  • To maintain her audience's confidence in her, what should kiara not do while delivering her presentation?
    10·1 answer
  • An example of creative curating is when a:
    9·1 answer
  • What does it mean for a heap to be complete?
    7·1 answer
  • Write a recursive function sumAll that accepts an integer argument and returns the sum of all the integers from 1 up to the numb
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!