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
Vinil7 [7]
3 years ago
9

Write a Java program that takes as input a paragraph as a String and identifies if any of the words in the paragraph is a $1.00

word. The value of each word is calculated by adding up the value of each one of its characters. Each letter in the alphabet is worth its position in pennies i.e. a
Computers and Technology
1 answer:
Verizon [17]3 years ago
4 0

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 System.out.print("Enter paragraph: ");

 String para = input.nextLine();

 String[] para_words = para.split("\\s+");

 for (int i = 0; i < para_words.length; i++) {

     para_words[i] = para_words[i].replaceAll("[^\\w]", "");

     char[] eachword  = para_words[i].toCharArray();

     int penny = 0;

     for(char c : eachword){

         int value = (int)c;

         if(value<=122 && value>=97){   penny+=value-96;     }

         else if(value<=90 & value>=65){  penny+=value-64;  }

     }

     if(penny == 100){

         System.out.println(para_words[i]);

     }

       penny = 0;

}

}

}

Explanation:

<em>Due to the length of the explanation, I've added the explanation as an attachment</em>

Download txt
You might be interested in
_ is a model of computing in which computer processing, storage, software, and other services are provided as a shared pool of v
Jet001 [13]

Answer:

Cloud computing is the correct answer of this question.

Explanation:

Cloud computing presents a easy way of consuming databases, servers, repositories and a vast variety of web technology infrastructure.Cloud computing allows that can save considerable construction costs without relying on internal server resources and device requirements.Cloud computing is the provision of various resources over the Web.

8 0
3 years ago
Why might you use the More button in the Find and Replace dialog box?
den301095 [7]

Answer:

Use the More button to display more options to help narrow the search criteria.

Explanation:

<em> I think hope this helps you!!</em>

6 0
2 years ago
identify three ways we use analog and digital signals in our everyday lives. Describe how radio telescopes are used to explore s
spayn [35]
We use analog and digital signals in our everyday lives with the radio, the cell phone and with our own computers. our computers and our cell phones are all digital now but radio's are still considered analog. Radio telescopes explore space by using radio waves and signals to almost like scan space and collect data like a sonar in a submarine. 
8 0
3 years ago
Read 2 more answers
Rutherford concluded from his calculations that the volume of an atom is filled with protons, neutrons and electrons. is mostly
enyata [817]

Answer:

The answer is "is mostly empty space".

Explanation:

In the given question option numbers is defined, so the explanation to this question  as follows:

The volume of an element holds one mole at high temperatures. The nuclear mass is usually indicated by mole: cc/mol in the \ cm^3. It is also known as a quantity, in which the same molecule was the measured values based on atomic mass as well as the thickness of both, and certain alternatives were wrong which can be explained as follows:

  • atom doesn't fill the protons, neutrons, and electrons.
  • It can't revolve with outside atoms and electrons.

6 0
3 years ago
¿Qué diferencia existe entre un virus biológico y virus informático?
ddd [48]

Answer:

i dont know spanish but i am gussing that you want to find differnce in virus information?

Explanation:

6 0
3 years ago
Other questions:
  • HURRY UP NEED HELP!!! What are examples of curricular education? Check all that apply.
    9·2 answers
  • Refer to the exhibit. the gigabit interfaces on both routers have been configured with subinterface numbers that match the vlan
    11·1 answer
  • Cuales Son las características de la máquina analítica de Carlos Babbage ?
    11·1 answer
  • HELP!!! Bad things about Helen Keller. I'm doing a debate and i need to prove that Steve Jobs is better than Helen Keller!!
    14·1 answer
  • Microsoft Excel is an example of a(n) application.
    11·2 answers
  • 14. Which of the following information about the ESRT T-teen rating rating is FALSE?
    15·1 answer
  • What is the process of adding random characters at the beginning or end of a password to generate a completely different hash ca
    10·1 answer
  • The first page of a website is what?​
    5·2 answers
  • You are shooting water balloons with a slingshot. One water balloon goes twice as far as another. Which of the following is the
    8·1 answer
  • _____ is rampant with bugs and shortcomings because most programmers do not know how or do not take the time to incorporate secu
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!