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
Help with math homework pls! NO WRONG ANSWERS!!!
Masteriza [31]

We have been given the expression

\frac{a\cdot a \cdot a \cdot a \cdot a \cdot a }{a}

We have to write this expression in the form a^n

In order to write the given expression in this form, we can use some exponent property.

(1) x^a\cdot x^b= x^{a+b}\\\\(2)\frac{x^a}{x^b}=x^{a-b}

On using the property (1), we have

\frac{a\cdot a \cdot a \cdot a \cdot a \cdot a }{a}\\\\=\frac{a^{1+1+1+1+1+1}}{a}\\\\\frac{a^6}{a}

Now, on using the property (2), we get

\frac{a^6}{a}\\\\=a^{6-1}\\\\=a^5

Therefore, the simplified form of the given expression is

a^5

4 0
3 years ago
Which order pair lies on the line 2x-y= -5
Lady bird [3.3K]

Answer:

Let's solve for x.

2x−y=−5

Step 1: Add y to both sides.

2x−y+y=−5+y

2x=y−5

Step 2: Divide both sides by 2.

2x/2=y-5/2

Answer:

x=1/2y+-5/2

4 0
3 years ago
What is 5r^2 = 80<br><br> It says solve each equation with the quadratic formula.
katovenus [111]
5r^2 = 80 \ \ /:5\\ \\r^2=\frac{80}{5}\\ \\r^2=16\\ \\r^2-16=0\\ \\ r^2 - 4^2 =0 \\ \\(r-4)(r+4)=0

r-4=0 \ \ \vee \ \ r+4 =0 \\ \\r=4 \ \ \vee \ \ r = -4 \\ \\ \\ a^2-b^2 = (a- b)(a+b)


5 0
3 years ago
*PLEASE HELP* *ANY IRRELEVANT ANSWERS WILL BE REPORTED AS SPAM*
drek231 [11]

Answer:

67.307

Step-by-step explanation:

30×25=750

100×80=8000

750+8000=8750

8750/130=67.307... total hits divided by total games

8 0
2 years ago
Read 2 more answers
Below are monthly rents paid by 30 students who live off campus.
Hatshy [7]
What is the question
6 0
1 year ago
Other questions:
  • Chloe charged for admission to her play on three different nights. Each night, a different number of people were in attendance,
    15·1 answer
  • Given: Each block has masses m1 = m2 =
    13·1 answer
  • Which ratio (fraction) correctly represents 0.1%?<br><br><br><br> please answer ASAP!
    8·2 answers
  • Need help....ASAP on both 7 AND 8
    12·1 answer
  • Multiply and simplify. 2x2y3z2 · 4xy4x2 how to do?
    12·1 answer
  • Which of the following is an arithmetic sequence?
    13·2 answers
  • A closed container has 3.06 ⋅ 1023 atoms of a gas. Each atom of the gas weighs 1.67 ⋅ 10–24 grams. Which of the following shows
    14·2 answers
  • Find the distance between the two points rounding to the nearest tenth (if necessary).
    6·1 answer
  • I NEED HELP ASAP!!!!!
    14·2 answers
  • A single, standard cube is tossed. What is the probability of getting a number greater than 3?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!