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
Anton [14]
3 years ago
14

A multiplication problem is provided as a string using the format 'x times y'. Create a function called MultiplyString to extrac

t the numbers that should be multiplied from a character vector called inputCharVect, and then assign the product to the variable multResult.
Mathematics
1 answer:
Varvara68 [4.7K]3 years ago
3 0

Answer:

import java.util.*;

public class MyClass {

   public static void main(String args[]) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter your statement: ");

       String inputCharVect = scan.nextLine();

       multiplyString(inputCharVect);        

   }

   

   public static void multiplyString(String input){

       int indexOfWordStart = input.indexOf("t");

       int indexOfWordEnd = input.indexOf("s");

       String firstString = input.substring(0, indexOfWordStart);

       String secondString =input.substring(indexOfWordEnd + 1);

       int firstNumber = Integer.parseInt(firstString.trim());

       int secondNumber = Integer.parseInt(secondString.trim());

       int multResult = firstNumber * secondNumber;

       System.out.println(multResult);

   }

}

Step-by-step explanation:

The first line of the program is the import statement which import Scanner to allow user input. Then, the user input is assigned to inputCharVect, which is then supplied as arguments to the method multiplyString.

The multiplyString method then extracts the index of 't' and 's' which are the start letter for times, then generate a substring, after which it was assigned to firstNumber and secondNumber. The product of firstNumber and secondNumber is assigned to multResult.

You might be interested in
the total of housemates in my house is x. a housemate is not there. Stay some people y If 12-x = (y+3) nuggets in the pan are co
mart [117]

Answer:

because of the gravity of the earth

8 0
2 years ago
Convert 8.45km to metres.​
zhenek [66]

Answer:

8450 metres.

Step-by-step explanation:

To convert kilometres to metres, multiply the kilometre value by 1000.

For example:

8.45 \times 1000 = 8450

It might also help to see it as shifting the decimal point three places to the right.

4 0
3 years ago
Read 2 more answers
At a conference the organizer determined at 32% of the attendees were between the ages of 18 and 29 there were 216 attendees in
miss Akunina [59]

Answer:

675 total attendees at the conference.

Step-by-step explanation:

Let x represent total attendees at the conference.

We have been given that at a conference the organizer determined at 32% of the attendees were between the ages of 18 and 29. There were 216 attendees in this age range. We are supposed to find the total attendees at the conference.

To find the number of total attendees at the conference, we will set as equation where 32% of x is equal to 216.

\frac{32}{100}x=216

0.32x=216

\frac{0.32x}{0.32}=\frac{216}{0.32}

x=675

Therefore, there were 675 total attendees at the conference.

8 0
3 years ago
Please help me with this
nata0808 [166]

A scatter plot is made with the data shown:

<span><span>Number of Weeks in Business123456789</span><span>Number of Customers0246810121416</span></span>

What type of association will the scatter plot for this data represent between the number of weeks in business and the number of customersA scatter plot is made with the data shown:

<span><span>Number of Weeks in Business123456789</span><span>Number of Customers0246810121416</span></span>

What type of association will the scatter plot for this data represent between the number of weeks in business and the number of customers?

3 0
3 years ago
Find the value of each variable for y and z
Sveta_85 [38]

Answer:

y = 102° , z = 75°

Step-by-step explanation:

Assuming this is geometry, you must find the value of 'z' first.

Using the [Supplementary Angles Theorem] for 'z' :

105° + z = 180°

Solve for z.

z = 75°

You may also hear that those two angles are a 'Linear Pair'

Then using the formula for: [Sum of Internal Angles]

Which is: sum = (n-2) * 180°      where 'n' is the number of sides

The total sum of internal angles of a quadrilateral is 360°

Now knowing 3 of the 4 interior angles, you can just do arithmetic:

99° + 84° + 75° + y = 360°

Simplify:

258° + y = 360°

Therefore:

y = 102°

3 0
3 years ago
Other questions:
  • HELP TRIGONOMETRY !!!!
    8·1 answer
  • In right triangle PQR PR=17 RQ=15 PQ =8 What is tan P<br><br> What is the answer
    15·1 answer
  • How much money will you have in 3 years if you invest $1000 at 3% compounded monthly?
    15·1 answer
  • Factor the expression. 3p + 21
    15·1 answer
  • Mr. Carter's class is selling raffle tickets for the school fundraiser. They sold 12 tickets and made $36. How much does 1 ticke
    6·2 answers
  • What is 33 divided by 2244
    6·2 answers
  • What is the domain of the function y=sqrt x+4
    9·1 answer
  • BRAINLIEST FOR WHOEVER ANSWER CORRECTLY!!!
    9·2 answers
  • Please help with this question ​
    8·1 answer
  • Which of the following is a linear function
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!