answer.
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
Deffense [45]
2 years ago
6

Write a code segment that uses an enhanced for loop to print all elements of words that end with "ing". As an example, if words

contains {"ten", "fading", "post", "card", "thunder", "hinge", "trailing", "batting"}, then the following output should be produced by the code segment. fading trailing batting Write the code segment as described above. The code segment must use an enhanced for loop to earn full credit.
Computers and Technology
1 answer:
nadezda [96]2 years ago
6 0

Answer:

 public static void main(String[] args) {

   String ing[] = {"ten","fading","post","card","thunder","hinge","trailing","batting"};

   for (String i: ing){

     if (i.endsWith("ing")){

       System.out.println(i);

    }

   }

 }

Explanation:

The for-loop cycles through the entire list and the if-statement makes it so that the string is only printed if it ends with "ing"

You might be interested in
A shop will give discount of 10% if the cost of purchased quantity is more than 1000. Ask user for quantity suppose, one unit wi
UkoKoshka [18]

Answer:

The program in Python is as follows:

qty = int(input("Quantity: "))

price = 100 * qty

if qty >1000:

    price = (100 - 0.10 * 100) * qty

print("Cost: "+str(price))

Explanation:

This prompts the user for the quantity

qty = int(input("Quantity: "))

This calculates the price or cost, without discount

price = 100 * qty

This checks if the quantity is greater than 1000

if qty >1000:

If yes, this calculates the price or cost, after discount

    price = (100 - 0.10 * 100) * qty

This prints the calculated cost

print("Cost: "+str(price))

4 0
1 year ago
If the result is for a BART Transit Station: "Daly City Station" with the result address "Daly City,CA". What is the correct rat
Sholpan [36]

Answer:

c. Incorrect street number and correct street name

Explanation:

Bay Area Rapid Transit (BART) is a transportation system that runs along San Francisco in California. The transport system knows the streets of California because it runs on it.

The system keep on improving with time and following the trends of other transport systems in the the world, Like using the Debt cards and credit card to charge for their fares. More than 433,000 people use the transportation system in California.

From the question, The resulting address is accurate while entering ‘Dala city Station’, to the BART Transit Station, the address comes as Dala City CA 94014.

3 0
2 years ago
If a car's is malfunctioning, people in the car will become ill when driving long distances, especially if the windows are close
galben [10]
The Carbon Monoxide will build up in the inside of the car by venting through, causing the passengers to breathe it. It will first make them ill, then kill them. They cannot detect this gas
5 0
2 years ago
Read 2 more answers
CAPTCHAs can be used as a form of signature to create a valid contract in e-commerce. True False
Len [333]
Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions.
The statement "CAPTCHAs can be used as a form of signature to create a valid contract in e-commerce. " is true. It is <span>a program or system intended to distinguish human from machine input, typically as a way of thwarting spam and automated extraction of data from websites.</span>
4 0
1 year ago
Read 2 more answers
A chemical found in the synaptic vesicles , which , when released . has an effect on the next cell is called a?
ruslelena [56]
Neurotransmitters is the chemical found in the synaptic vesicles that, when released, has an effect on the next cell.
7 0
2 years ago
Other questions:
  • Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In one to two sentences,
    9·2 answers
  • Gabe wants to move text from one document to another document. He should _____.
    10·2 answers
  • An mp3 takes up about 16 kilobytes of memory per second of music. if you owned a one terabyte hard drive and filled it with only
    15·1 answer
  • Julie is working on a spreadsheet with data about the company's profits. They will be sharing this data with customers. She chec
    6·2 answers
  • Consider a DASH system for which there are N video versions (at N different rates and qualities) and N audio versions (at N diff
    8·1 answer
  • "Suppose there is a class Alarm. Alarm has two class variables, code which contains a String value representing the code that de
    10·1 answer
  • Address the FIXME comments. Move the respective code from the while-loop to the created function. The add_grade function has alr
    14·1 answer
  • The ____________ is an efficient method to mount, power, and organize electrical motor control, automation, and power distributi
    5·1 answer
  • What is the Gain (dB) of a transmission if the Maximum Data Rate is 1 Gbps and the Bandwidth =7000 MHz? Group of answer choices
    6·1 answer
  • Translate the following MIPS code to C. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!