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
In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
Sergio039 [100]

Answer:

yes

Explanation:

6 0
3 years ago
Which type of lenses shrinks the image in front of it rather than magnifying it? A)Telephoto B)Optical zoom C)Digital zoom D)Wid
Bingel [31]

Answer:

D. Wide angle

Explanation:

Wide angle camera is specifcally designed to shrinks the image using the lens with  smaller focal length compared to average camera.This type of camera is commonly used to capture wider area of scenery. Or to give an impression that the objects that near the camera seems larger than they actually are.

8 0
3 years ago
n a​ poll, 6767​% of Internet users are more careful about personal information when using a public​ Wi-Fi hotspot. What is the
a_sh-v [17]

Answer:

The probability that among three randomly selected Internet​ users, at least one is more careful about personal information when using a public​ Wi-Fi hotspot is 0.964

If the survey subjects <em>volunteered</em> to​ respond , then those with the strongest opinions are most likely respond. The survey sample is then not randomly selected, the survey may have a <em>response bias.</em>

Explanation:

Let P(at least one is more careful about personal information when using a public​ Wi-Fi hotspot) denote the probability that among three randomly selected Internet​ users, at least one is more careful about personal information when using a public​ Wi-Fi hotspot, then we have the equation

P(at least one is more careful about personal information when using a public​ Wi-Fi hotspot) = 1 - P(none of the selected users is more careful about personal information when using a public​ Wi-Fi hotspot)

  • If 67​% of Internet users are more careful about personal information when using a public​ Wi-Fi, then 33% of them are not.

P(none of the selected users is more careful about personal information when using a public​ Wi-Fi hotspot) = 0.33^{3} ≈ 0.036

P(at least one is more careful about personal information when using a public​ Wi-Fi hotspot)  = 1 - 0.036 = 0.964

4 0
3 years ago
Jessie will make and sell the trending Baked California Maki. Her Peso mark up is 5.00. Selling price PHP 15.000. How much will
Levart [38]

Answer:

50%

Explanation:

The markup is the difference between the selling price and the cost price. If the mark up is greater than zero, it means there is a profit, if the markup is less than 0, it means there is a loss and if the markup is equal to 0, it means there is breakeven.

Percentage markup = (markup/cost price) * 100%

Selling price - cost price = markup

15 - cost price = 5

cost price = 10

Percentage markup = (markup/cost price) * 100% = (5/10) * 100% = 50%

7 0
3 years ago
Typically, you need to score _____ or higher on an AP exam to receive college credit for the AP course in the subject tested by
ss7ja [257]

the answer is A). 3 or higher

7 0
3 years ago
Read 2 more answers
Other questions:
  • This is for the folks that is rude:
    12·1 answer
  • After reading passage “the incredible machine” why do you think the article has been titled so?
    13·1 answer
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • ____ is the code of acceptable behaviors users should follow while on the internet; that is, it is the conduct expected of indiv
    10·1 answer
  • Which type of operating system is usually used in personal computers
    13·1 answer
  • The length property of the String object returns
    15·1 answer
  • You want to use a terminal program to terminal into a cisco router. what protocol should i use
    8·1 answer
  • This is your chance to become the instructor. After learning the looping and input validation concepts, create a problem to give
    13·1 answer
  • Describe the uses of computer in different fileds? please help me ​
    14·1 answer
  • Hola, alguien aquí me podría ayudar dándome ideas a cerca de office (Word, PowerPoint o Excel) estoy desesperada no puedo pensar
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!