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
Which of the following is a requirement for the Safety Data Sheet (SDS)?​
Natasha_Volkova [10]
What are the options?
4 0
2 years ago
Users in a corporation currently authenticate with a username and password. A security administrator wishes to implement two-fac
Katen [24]

Answer:

Option (C) is the correct answer of this question.

Explanation:

Smart card is the security administrator wishes to implement two-factor authentication to improve security.Normally this data is affiliated with either meaning, information, or both, and will be stored and transmitted within the chip of the card.A smart card, usually a Chip Card type.

  • It is a flexible card that holds an integral computer chip that preserves and sends a signal data, either database or semiconductor form.
  • Used for controlling access to a resource.
  • Data authentication, encryption, cloud storage, and software processing can be established by smart cards.

Other options are incorrect.

4 0
3 years ago
Diane wants to maintain a record of grades she scored in the fifth, sixth, and seventh grades. She enters her grades and the tot
sammy [17]
The answer of the given question above would be the second option: NUMBERS. Based on the given scenario above about Diane who wants to maintain a record of grades she scored in the fifth, sixth, and seventh grades and enters  her grades and the total percentage she scored in a spreadsheet, the tab o<span>n the Format Cells dialog box that will enable her to display the total percentage symbol in the spreadsheet would be the Numbers. Hope this helps.</span>
6 0
3 years ago
Read 2 more answers
Screen reader software is an example of a(n) ____.
s2008m [1.1K]
<span>It is an example of an assistive output device. These are an example of assistive technology, which is any technology optimized to help the user mitigate the aspects of a disability. This may enable them to use the technology as intended, or it may also assist them in functioning in their everyday lives.</span>
3 0
3 years ago
Disadavantage of using internet?​
skad [1K]

Answer:

Radiation from the screens will damage your brain and kill brain cells.

The lights dry out your eyes and you blink a lot more.

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • Why is it important to explore an Integrated
    13·1 answer
  • A ____ is a type of program that uses a grid to organize and work with data.
    14·1 answer
  • Study and compare the tables and draw conclusions.
    13·1 answer
  • Write a program that reads two fractions such as 1/2 and 1/4 and computes and stores the sum, the difference, the product and th
    15·1 answer
  • A group of computers that are interconnected in order to share information or documents is called what?
    13·1 answer
  • Can someone start me off with a short 2 or 3 paragraphs about the pros and cons of Microsoft Word, and if you can recommend a si
    12·1 answer
  • Citing Wikipedia as a reference is not considered a good practice because 1.leverages a neutral point of view. 2.hosts unopinion
    8·1 answer
  • Write a technical term for following statements
    15·1 answer
  • QueSUUN TU
    15·1 answer
  • The direction of a ratchet is reversed by _______________________.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!