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
mestny [16]
3 years ago
8

) Write the code to display the content below using user input. The program Name is Half_XmasTree. This program MUST use (ONLY)

for loops to display the output below from 10 to 1 therefore ...1st row prints 10 star 2nd row prints 9… 3rd print 8 stars and so forth... This program is controlled by the user to input the amount of row. A good test condition is the value of ten rows. The user will demand the size of the tree. Remember the purpose of print() and println()

Computers and Technology
1 answer:
harina [27]3 years ago
4 0

Answer:

Following are the program in java language that is mention below

Explanation:

import java.util.*;  // import package

public class Half_XmasTree // main class

{

public static void main(String args[])  // main method

{

int k,i1,j1; // variable declaration  

Scanner sc2=new Scanner(System.in);   // create the object of scanner

System.out.println("Enter the Number of rows : ");

k=sc2.nextInt(); // Read input by user

for(i1=0;i1<k;i1++)  //iterating the loop

{

for(j1=0;j1<i1;j1++)  // iterating the loop

System.out.print(" ");

for(int r=k-i1;r>0;r--)  //iterating loop

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

System.out.println();

}

}

}

Output:

Following are the attachment of output

Following are the description of program

  • Declared a variable k,i1,j1 as integer type .
  • Create a instance of scanner class "sc2" for taking the input of the rows.
  • Read the input of row in the variable "K" by using nextInt() method .
  • We used three for loop for implement this program .
  • In the last loop we print the * by using system.println() method.

You might be interested in
Select the true statement from the choices below. Group of answer choices Invalid code may cause browsers to render the pages sl
IrinaK [193]

Answer:

(A) A web page will not display in a browser unless it passes syntax validation testing.

(C)A web page must pass syntax validation testing before it is used.

Explanation:

A website is a collection of related web pages. A web page is an electronically arranged content page, designed and developed using web development application and language tool and hosted on a web server.

Web page or application development follows a series of well defined stages called software development life cycle (SDLC). The web application must go through these processes from birth to the end-of-life of the application.

The validation testing in SDLC, consisting of unit, acceptance and loading testing, which checks for syntax error or bugs on the written codes, because bugs could slow the loading of the page or even the display and browser compatibility of elements in the code.

5 0
3 years ago
Discuss the economical challenges in software reuse using suitable examples.
Liula [17]

Answer: Reusing software device has some economical challenges such as:

  • Investment cost in reusing the device is considered as the extra cost.It  might require some extra components for the working to become usable
  • Requires skilled person who can develop and design the software to be used again.The creating and designing of new software design is comparatively easy but making the system reusable requires someone who has more designing skill who will be highly paid for the work
  • Cost of writing and reading of the software can also be considered as the economical challenge as the reused system created is to be studied by some other organization members or sources not familiar with the functioning. .

4 0
3 years ago
Will somebody please explain to me HTML?
larisa86 [58]

Answer:

Hypertext Markup Language (is also known as html) is the standard markup language for creating web pages and web applications.

3 0
3 years ago
A search engine finds bugs and system failures in your computer.<br><br> True or False?
scZoUnD [109]
It is false search engine are used for searching for something
6 0
2 years ago
Read 2 more answers
You created a two-dimensional array with the following code.
Dennis_Churaev [7]

Explanation:

I would say aList[1][2]

6 0
3 years ago
Read 2 more answers
Other questions:
  • When pasting an object which has been copied from a different slide, where on the slide does the object paste, assuming nothing
    15·1 answer
  • Amazon Web Services (AWS): Group of answer choices a) forms a majority percentage of Amazon's overall revenue. b) was introduced
    15·1 answer
  • Create a class named Console, and move all the methods that retrieve and validate user input to that class. These methods can re
    7·1 answer
  • An electronic storage file where information is kept is called a cpu. true false
    11·1 answer
  • Write a program that prompts the user to enter a grade, which is aninteger in the range of 0 - 100. Using if statements, have th
    11·1 answer
  • What Fortnite skin is more og?
    5·2 answers
  • When a collection of honeypots connects several honeypot systems on a subnet, it may be called a(n) honeynet
    9·1 answer
  • Running the Disk Cleanup utility is a quick way to ________. Group of answer choices defrag your hard drive remove spyware progr
    10·1 answer
  • You text file begins with the following rows. The pattern is a description of the item to be repaired, its color, and the issue.
    14·1 answer
  • your manager asked you to set up a secure network connection at a remote site to move over some back ups. what protocol what do
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!