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
In online education is intrinsically related to equity. Professionalism Communication Accessibility
ratelena [41]

Answer:

The correct answer is C. Accessibility.

Explanation:

Online education is understood as the educational system by which knowledge is acquired through the use of computer media in which students interact with teachers electronically without personally attending classes in person. This type of education has advantages and disadvantages: in terms of the pros, it is an education system that requires less time and mobility on the part of the student, thus facilitating the process of learning and making the times more effective, but in terms of its cons, online education is not always accessible, as in order to access it requires a certain connectivity capacity, that is, the provision of a computer and an internet network capable of guaranteeing the functioning of online educational systems.

In this context, accessibility is understood as the ability of each individual to acquire an online education through the use of the necessary means for this, so accessibility implies the possibility of accessing said electronic media. This is related to equity, as online education systems should be able to guarantee their use by means of equipment that is as less specific as possible so that any common person can access them.

7 0
3 years ago
Read 2 more answers
Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate
Alecsey [184]

Answer:p=float(input("Enter current bank balance:"))

i=float(input("Enter interest rate:"))

t=float(input("Enter the amount of time that passes:"))

print((p ((1+i)*t)))

Explanation:if this answer it looks weird its my phones fault

4 0
3 years ago
Read 2 more answers
The IBM nine-track tapes that became the industry standard for storage for three decades had several sizes , the most common bei
sergey [27]

Answer:

5 MB.

Explanation:

1 foot = 12 inches

2400/9=266.66 feet per track

1 track excluding, remaining 8 track =2400 - 266.66 = 2133.33 feet

so, space available to store data = 2133.33 feet

now, 2133.33 feet = 25600 inches

total data that can be stored = 25600 * 1600 = 40960000 bits

= 46080000/8 = 5120000 Bytes

= 5120000/1000000 = 5.12 MB = 5 MB (approx.)

3 0
3 years ago
Writers in our networked world enhance their credibility by
yaroslaw [1]

Answer:

b

Explanation:

5 0
3 years ago
Which education and qualifications are most helpful for Law Enforcement Services careers? Check all that apply.
bixtya [17]

Explanation:

For IAS..we need a high amptual amount of knowledge..

For IPS..we need master degree and physical fitness too..

For An Advocate..we need Master degree and social Skills..

so..the education and qualifications depends on the various jobs..

HOPE THE ANSWER IS USEFUL

3 0
3 years ago
Other questions:
  • MATLAB graphics user interface:<br> Describe what Folder, Command Window and Workspace are.
    5·1 answer
  • At what point is an idea protected by copyright?
    7·2 answers
  • Catherine wants to search online for fruit juices. She is fine with aerated or fresh fruit juices. Which Boolean operator will e
    12·2 answers
  • Which feature is an interface between the user and the file system of a computer?
    6·2 answers
  • Name the function in Python that prompts user to enter values as per the data type specified.
    5·1 answer
  • "Managers and department heads across the nation strategize on a weekly, if not daily, basis. For the past three quarters, telep
    6·1 answer
  • Edhesive 3.2 Lesson Practice question 1
    5·1 answer
  • How was the addition of an improvement over early web design?
    11·1 answer
  • Edhesive 9.3 code practice
    11·1 answer
  • Select the correct answer. Which step references adding color, size, and media format in your digital portfolio? A. identifying
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!