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
Novay_Z [31]
3 years ago
12

Given an int variable n that has already been declared and initialized to a positive value, write a Java program that prints the

reverse triangle of asterisks with n asterisks on the first line (top of triangle), one less asterisk on the next level, and so on till 1 asterisk on the bottom level. (All asterisks aligned on the left, not centered in the middle, so you don’t need blanks. But think how you would have solved this problems if you’d need to center the triangle!)
Computers and Technology
1 answer:
Mars2501 [29]3 years ago
6 0

Answer:

The program to this question can be given as:

Program:

public class Main //define class.

{

public static void main(String[] as) //define main method.

{

int n=5; //define variable n and assign positive value.

int i,j; //define variable

for (i = 7; i>=1; i--) //outer loop.

{

for (j = 0; j< i; j++) //inner loop.

{

System.out.print("*"); //print asterisks.

}

System.out.println(); //line break.

}

}

}

Output:

*****

****

***

**

*

Explanation:

The description of the above code can be given as:

  • In the above java programming code firstly we define a class that is "Main". In this class we define a main method in the main method we define a variables that is "n" in this variable we assign a positive value. The we define another integer variable that is i,j this variable is used in the loop.
  • Then we define a loop. for prints asterisks values in reverse triangle, we nested looping concept. In nested looping, we use in loop in this loop we use the i and j variables that print the asterisks value.

You might be interested in
Write a function called st_dev. st_dev should have one
aleksandrvk [35]
Huluttttttt!!! greggyffh
8 0
1 year ago
1. True or false: The more pixels per inch in an image, the higher the resolution is. (1 point)
Annette [7]
1. true
2. pixel
3. raster images are built with pixels
4. false
5. image size
6. rollover
7. sharp with clear details
8. 78px
9. 24in
10. scalability
3 0
2 years ago
What are paragraphs separated by
Lemur [1.5K]

Paragraphs are usually separated by blank space.

Hope this is what you were looking for :)

6 0
2 years ago
The customer's endpoint device on the wan is called the __________________.​
Lelu [443]
<span>The customer's endpoint device on the WAN is called the Data Terminal Equipment (DTA).
WAN 
is wide area network, referring to a network that extends over a large area. DTA is an end instrument which converts information into signals.</span>
3 0
3 years ago
What file can you edit on a linux system to configure shared folders using samba?
TiliK225 [7]

/etc/samba/smb.conf is the file you can edit on a linux system to configure shared folders using samba.

<h3>What is a Linux system ?</h3>
  • A Unix-like operating system (OS) for desktops, servers, mainframes, mobile devices, and embedded devices, Linux is open source and user-developed.
  • One of the most broadly supported operating systems, it is supported on virtually all popular computing platforms, including x86, ARM, and SPARC.
  • Windows OS is a for-profit operating system, whereas Linux is an open-source alternative. In contrast to Windows, which lacks access to the source code, Linux allows users to modify the code as needed.
  • Applications, interfaces, programs, and software are all produced through Linux programming. Desktops, real-time apps, and embedded devices frequently employ Linux code.
  • Programmers can learn about the Linux kernel for free online, enabling them to use, modify, and develop Linux without restriction.

Learn more about linux system refer to :

brainly.com/question/25480553

#SPJ4

6 0
1 year ago
Other questions:
  • If you wanted to only view the sales of $200,000+ in the table above, which number filter would you select?
    7·1 answer
  • Marisol manages the online advertising campaigns for a chain of toy stores with both a physical and an online presence. Which Go
    7·1 answer
  • Which statement describes the word "iterative"?
    9·1 answer
  • Which type of security threat installs to a computer without the user's knowledge and then monitors all computer activity?
    12·2 answers
  • Describe one type of technology that is useful in producing images from space.
    9·1 answer
  • List the operating system you recommend, and write a sentence explaining why.
    8·1 answer
  • Write a function called prod_all that takes any number of arguments and returns their sum. Test the function by using these two
    10·1 answer
  • For a business that is properly using a social media information system, the system can
    13·1 answer
  • Jeri wants to make sure she designs her web site for a specific group of people. What will help her plan who will visit the site
    8·2 answers
  • This method of file transfer has been used for decades and is frequently used for uploading changes to a website hosted by an in
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!