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
Westkost [7]
4 years ago
13

3. Write the code to print the No. 50 Fibonacci number. (2 points) 4. A homophone is one of two or more words that are pronounce

d alike but are different in meaning or spelling; for example, the words "two", "too", and "to". Write a Java program that uses HashMap to find the most words that has the same homophones and return the count of the number of words. (2 points)
Mathematics
1 answer:
DiKsa [7]4 years ago
8 0

Answer:

Answers explained below

Step-by-step explanation:

<u>SOLUTION 3</u>

//Till 50 numbers

import java.util.ArrayList;

import java.util.LinkedList;

public class Driver {

public static void main(String[] args) {

//Upto 50

int num = 50, x = 0, y = 1;

 

System.out.print("Till number " + num + ": ");

for (int i = 1; i <= num; ++i)

{

System.out.print(x + " + ");

int addition = x + y;

x = y;

y = addition;

}

}

}

<u>Solution 4: </u>

import java.util.ArrayList;

import java.util.Arrays;

import java.util.HashMap;

import java.util.LinkedList;

public class Driver {

public static void main(String[] args) {

// Some homophonic words are:

/*

* ate, eight

* bare, bear

* buy, by, bye

* eye, I

*

*/

// Creating Hashmap

HashMap<String, String[]> homo = new HashMap<String, String[]>();

homo.put("ate", new String[] { "ate", "eight" });

homo.put("bare", new String[] { "bare", "beare" });

homo.put("buy", new String[] { "buy", "bye", "by" });

homo.put("eye", new String[] { "eye", "I" });

for (String i : homo.keySet()) {

int count=homo.get(i).length;

System.out.println(i+" has "+count+" homophone words");

}

}

}

You might be interested in
Just making sure I got this right.
Eva8 [605]
There's nothing answered in that.
8 0
3 years ago
Please help on this one?
Sedaia [141]

The inverse is where the x and y values are flipped, so the left side would have 6 7 8 9 and the right side would have 9 10 11 12 for the inverse.

Therefore your answer is A.

4 0
3 years ago
Round 219.870754015 to the nearest hundred.
KatRina [158]

Answer:

200

Step-by-step explanation:

Because you are rounding to the hundreds, you look at the tens place. The tens place is a "1" and 1 is below five, so you round down to 200.

4 0
3 years ago
Read 2 more answers
You put $200 into an account earning 6% interest compounded yearly.
VMariaS [17]

Answer:

43.35 years

Step-by-step explanation:

From the above question, we are to find Time t for compound interest

The formula is given as :

t = ln(A/P) / n[ln(1 + r/n)]

A = $2500

P = Principal = $200

R = 6%

n = Compounding frequency = 1

First, convert R as a percent to r as a decimal

r = R/100

r = 6/100

r = 0.06 per year,

Then, solve the equation for t

t = ln(A/P) / n[ln(1 + r/n)]

t = ln(2,500.00/200.00) / ( 1 × [ln(1 + 0.06/1)] )

t = ln(2,500.00/200.00) / ( 1 × [ln(1 + 0.06)] )

t = 43.346 years

Approximately = 43.35 years

7 0
3 years ago
Which ratio forms a proportion with 14/42?<br> 1/4<br> 7/21<br> 12/40<br> 28/80
bogdanovich [222]
Second one



<span>7/21

Hope it helps

</span>
3 0
4 years ago
Read 2 more answers
Other questions:
  • What is the square root of 5
    13·1 answer
  • The temperature in St. Louis, Missouri, is 31°F. The temperature in Duluth, Minnesota, is -29°F. Is the temperature in St. Louis
    11·1 answer
  • A rectangle's length is twice its width. if the perimeter is 132 cm, find the width of the rectangle.
    11·1 answer
  • Hector needs to buy a window shade in his house. He measured the width of the window as 37 inches. The actual measurement is 40
    12·1 answer
  • All of the following are equivalent to 2(2a + b) + 8, except _____.
    6·2 answers
  • Abby has $200 in a savings account that earns 5% annually. The interest is not compounded, but simple interest. How much money w
    10·1 answer
  • An eccentric math teacher told his class that he would assign one problem on the first day of school, two
    10·1 answer
  • There are 407 students who are enrolled in an introductory Chinese course if there are five boys to every 6 girls how many boys
    12·1 answer
  • What is the area of a circle that is 11 millimeters?​
    10·1 answer
  • In january of 2013, mr edwards turned 64 years old. in what year was mr edwards born.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!