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
One of the newest electronic conveniences is the ________, which can serve as a credit card, a debit card, and even unlock doors
77julia77 [94]
Computer Chips. / SILICON. This is just an educated guess
7 0
3 years ago
Which technology can allow a single ground-based telescope to achieve images as sharp as those from the Hubble Space Telescope?
Ganezh [65]

Answer:

The correct answer to the following question will be "Adaptive Optics".

Explanation:

  • AO (Adaptive Optics) is a technique used to enhance optical system performance by reducing the impact of incoming gravitational wave distortions by compressing a mirror to compensate for the distortion.
  • It operates by calculating and compensating for defects in a wave-front with a system that corrects these errors as a deformable mirror or even a liquid crystal collection.
  • It is a technique that can make it possible for a single ground-based telescope to get images as clear as that of the Hubble Space Telescope.
  • Certain methods can achieve power resolution that exceeds the limit set by atmospheric distortion, for example, Aperture synthesis, Lucky imaging, and Speckle imaging.

Therefore, Adaptive Optics is the right answer.

7 0
3 years ago
Harvey is not happy with the software that allows the programmer to write and run code and wants to find something new. If Harve
Assoli18 [71]

Answer:

D. integrated development environment

Explanation:

Given that an integrated development environment is a form of computer software App that allows the users or programmers to develop a software App in a way the enables them to carry out different operations including source code development, build and test automation, and debugging activities.

For example NetBeans, Eclipse, IntelliJ, and Visual Studio.

Hence, in this case, the correct answer is "integrated development environment."

3 0
3 years ago
Which of the following is something that would NOT appear in the Reviewing pane?
Sophie [7]

Answer:

A

Explanation:

7 0
3 years ago
. What is a computer network? *
Citrus2011 [14]

Explanation:

Pretty sure its a group of two or more computers that are linked thogether

7 0
3 years ago
Other questions:
  • When IPv4 addressing is manually configured on a web server, which property of the IPv4 configuration identifies the network and
    12·1 answer
  • /*
    8·1 answer
  • Write a program that prompts the user to input five decimal numbers. The program should then add the five decimal numbers, conve
    5·1 answer
  • Suppose Host A sends Host B a TCP segment encapsulated in an IP datagram. When Host B receives the datagram, how does the networ
    11·1 answer
  • Wireless networks usually use ____ signals to send data.
    11·2 answers
  • What are advantages of using document templates?
    13·2 answers
  • What does Al stand for?
    10·1 answer
  • When we code an algorithm, we need to provide the commands in the order we want the
    10·1 answer
  • ____________ reference is used when you want to use the same calculation across multiple rows or columns.
    10·2 answers
  • Is a dot matrix printer an impact or non-impact printer
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!