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]
3 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]3 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
What is the value of this expression? 27+4×(8−4) Enter your answer in the box.
marta [7]

Answer:

43.

Step-by-step explanation:

Follow PEMDAS (Parentheses, exponents, multiply, divide, add, subtract). First you do 8-4 which is 4, then you multiply 4 by 4 which is 16 since you multiply next, then you add 27 to 16 which then gets you to 43.

3 0
3 years ago
Pls pls help i realy need help
lisov135 [29]

Answer:

a <= 3

Step-by-step explanation:

4 0
3 years ago
Please help!
laila [671]
Because
\frac{f(x)}{x-3} = 2x^{2} + 10x - 1
therefore
f(x) = (x-3)(2x² + 10x - 1) + k, where k =  constant.

Because f(3) = 4, therefore k =4.
The polynomial is
f(x) = 2x³ + 10x² - x - 6x² - 30x + 3 + 4
      = 2x³ + 4x² - 31x + 7

Answer:  f(x) = 2x³ + 4x² - 31x + 7

6 0
3 years ago
Does the following picture represent a linear function?
nekit [7.7K]

Answer: No

Step-by-step explanation: For x 0-2, the y is increasing by +5 every time. However, the moment it hits x=2, it starts decreasing by -5 every time. This means that it does not follow on set pattern (either +5 or -5) and looks more like a ^ than a /.

7 0
3 years ago
Read 2 more answers
Hi, thx for helping​
Sliva [168]

Answer:

C. 8.52624...

Step-by-step explanation:

The reason that C is different is because all of the other decimals are terminating decimals (meaning that they end or stop), while C is a repeating decimal, because it never ends.

7 0
3 years ago
Other questions:
  • What is the slope in the equation -7x +-7y=-1
    12·1 answer
  • Sarah has completed the first few steps for constructing the inscribed circle for triangle ABC. She started by constructing the
    13·2 answers
  • Please help I need for graph
    5·1 answer
  • Minus then changes from 115.5 inches tall to 23.1 inches tall. What percent of change is that?
    10·1 answer
  • Find each percent decrease. Round to the nearest percent. From 20 miles to 11 miles
    13·2 answers
  • May someone assist me?
    14·1 answer
  • Kiara downloaded 264 pictures from her cell phone to her computer. These pictures took up 528 megabytes of space in her computer
    12·1 answer
  • What's the answer????????
    9·2 answers
  • Can someone please help meee
    13·2 answers
  • Please answer with clear instructions so that i can apply this to other questions.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!