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
vova2212 [387]
3 years ago
14

Write a java program that will print out the following pattern 1 12 123 1234 12345

Computers and Technology
1 answer:
Ilya [14]3 years ago
5 0

Answer:

public class Main {

  public static void main(String[] args)

{

  int n,m;

  int k=5;

  for(n=1;n<=k;n++)

  {

for(m=1;m<=n;m++)

  System.out.print(m);

   System.out.print(" ");

   }

}

}

Explanation:

The solution to this problem is the use of nested loops of an inner and outer loop to generate a half pyramid of numbers, but displayed on the same line so we have a sequence 1 12 123 1234 12345. The outer loop iterates for n=1 to n<=5 and the inner loop that has the print statement prints the integers from for m = 1 to m<=n.

Note that the value k = 5 is hard coded which in some sense is the number of rows, that is the length of iteration of the outer loop.

You might be interested in
A news website uses 32-bit integers to count the number of times an article has been viewed. The website is becoming more popula
Irina-Kira [14]

Answer:

2^32 times as many values can be represented

Explanation:

32-bit. This means that the number is represented by 32 separate one’s and zero’s. 32 bits of 2 possible states = 2^32=4,294,967,296 possible values.

Integer meaning that only whole multiples of one are accepted.

Signed meaning that negative values are accepted. This halves the number of possible positive values (roughly), so the largest number you can represent is 2^31–1=2,147,483,647, but instead of 0, the smallest number you can represent is -2,147,483,648. An unsigned 32-bit integer, by contrast, can represent anything from 0 to 4,294,967,295.

7 0
3 years ago
JAVA
musickatia [10]

Answer:

class Main {  

 public static void main(String args[]) {

   int a = 5;

   int delta = 5;

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

       System.out.printf("%d, ", a);

       a += delta;

       delta += 2;

   }

 }

}

6 0
3 years ago
Walter’s health insurance premium increased by 22 percent this year. Now he pays $488 every month for health insurance. What was
ElenaW [278]

Answer:

$380.64

Explanation:

So he what you do is take $488 multiply it by 22% to get $107.36 you then subtract $488 from $107.36 to get what he was paying before premium increase which is $380.64

7 0
4 years ago
CRM software programs are designed to help companies gather all customer contact information into multiple data management progr
kogti [31]

Answer:

The correct answer is: CRM are often implemented into sales departments first since this area of a company typically generates the greatest amount of customer contact.

Explanation:

To begin with, a Customer Relationship Management or CRM is a management system used in the field of marketing and business in order to create a better relationship with the customers of a company under the creation of a system that uses all of the clients' personal data to achieve the goal of understanding them their likes and dislikes in order to get to known them better and generate a strong bond with them.

To continue, this system is typically used in the sales departments due to the fact that this area of the company is the one<u> that has more contact with the clients</u> at first sight. However, the system could be use in every department of the organization as well.

6 0
4 years ago
A computer screen that is contained in its own case and is not part of the computer system is called a
andre [41]

Answer:

Monitor is the correct answer

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the main benefit of seeing your document in Page Break Preview?
    9·2 answers
  • Special characters that display on the screen but do not print are called _____________
    15·1 answer
  • What will the following segment of code output? Assume the user enters a grade of 90 from the keyboard. cout &lt;&lt; "Enter a t
    5·1 answer
  • Which commands can be used to highlight a whole paragraph? Check all that apply.
    6·1 answer
  • مسألة لبرنامج الماتلاب لمصفوفة وعمود
    10·1 answer
  • Files and folders in UNIX can be removed using the
    8·1 answer
  • Ive already tried "word" and "star"
    12·1 answer
  • A boundary marks the inside and outside of a system and sets the system apart from its environment.
    11·1 answer
  • Which disipline involves creating computer networks
    13·2 answers
  • Poob bn vbyfcfgxfc jghjg jhgh
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!