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]
2 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]2 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
What are organization tools?
Nonamiya [84]
An app or software created to optimize your daily task performance
4 0
2 years ago
how could environmental and energy problem Kenya faces as far computer installations are concerned be avoided​
ipn [44]

The environmental and energy problem Kenya faces as far computer installations are concerned can be avoided​ by

  • Knowing and finding out the key aspect of ICT strength.
  • Create an holistic judgements in the assessment of ICT capability. Promote the use of solar power.

<h3>How can we overcome ICT challenges?</h3>

There are a lot of Energy Challenges in terms of ICT  in Kenyan and it is good the government and the people work towards energy in terms of sustainable ICT.

Therefore, The environmental and energy problem Kenya faces as far computer installations are concerned can be avoided​ by

  • Knowing and finding out the key aspect of ICT strength.
  • Create an holistic judgements in the assessment of ICT capability. Promote the use of solar power.

Learn more about computer installations from

brainly.com/question/11430725

#SPJ1

7 0
1 year ago
In company a, there is a team that performs day-to-day it operations with a focus on security. they are responsible for a wide r
jasenka [17]

The security operation being carried out by this team is Administrative in nature.

<h3>What is the role of an Administrators?</h3>

An Administrators is known to be a person who works or handles the day-to-day deployment, operation and looking of an IT environment.

Note that their areas of concern are the systems, networks and applications as well as others and as such, The security operation being carried out by this team is Administrative in nature.

Learn more about  security operation from

brainly.com/question/371967

#SPJ1

6 0
2 years ago
1. Data in a smart card can be erased
Ostrovityanka [42]

Answer:

false

true

false

true

true

5 0
3 years ago
Read 2 more answers
Personal computer hard disk platters typically have storage capacities ranging from 40 gb to ____.
Doss [256]
2tb I think I'm not that sure
7 0
3 years ago
Other questions:
  • Select all that apply. To select more than one worksheet at the same time, which of the following keys on your keyboard can you
    11·1 answer
  • What are six external parts of a computer
    11·1 answer
  • Page orientation can be either landscape or _____.
    13·1 answer
  • Whatis NOT a key factor while designing a website?
    12·1 answer
  • Which of the following is a quick way to restore the arrow pointer after you have used it for drawing?
    5·1 answer
  • A shortage of blood for transfusions for injured animals has resulted in the introduction of a synthesized product called Oxyglo
    15·1 answer
  • Create a macro named mReadInt that reads a 16- or 32-bit signed integer from standard input and returns the value in an argument
    5·1 answer
  • Describe the different
    12·1 answer
  • According to programming best practices, how should you handle code that needs to be repeated several times in a program?
    6·1 answer
  • The recipient list cannot be edited.<br> Group of answer choices<br><br> True<br><br> False
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!