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
Solve x3 = 1 over 8.<br><br> 1 over 2<br> ±1 over 2<br> 1 over 4<br> ±1 over 4
olganol [36]
The answer is 1/2. The reasoning is 1/2 x 1/2=1/4 1/4 x 1/2=1/8 fractions multiply on numerator and denominator then simplify
8 0
3 years ago
Read 2 more answers
A circle with the equation (x + 3)2 + (y - 2)2 = 25 is reflected over the line x = 2.
zlopas [31]
(x-7)² + (y-2)² = 25
3 0
3 years ago
Read 2 more answers
Mark walked 1212 miles in 5 hours. How many miles did Mark walk in 1 hour?
JulijaS [17]

Answer:

Step-by-step explanation:

5 0
3 years ago
Surface area help plz
lana [24]

Answer:

486 mm

Step-by-step explanation:

solve each side on it's own first

First 2 rectangles: 288 mm all together

2 rectangle: 144 mm

Triangles: 54 mm

Then add rectangles and triangles:

288 mm + 144 mm + 54 mm = 486 mm

8 0
3 years ago
Fiona recorded the mean math exam grade for six random samples of students from the entire seventh-grade class. Sample Sample Me
Charra [1.4K]

The reason why Fiona cannot make a valid prediction based on the mean of the population is that the variation of Fiona’s samples is too large.

<h3>Why can't Fiona use the means she recorded?</h3><h3 />

Mean is quite sensitive to outliers so it is best used when the variation between variables is not too much.

In Fiona's case, there variation is quite high with high variable of 95 compared to a low value of 45.

Find out more on effect of outliers at brainly.com/question/16815987.

#SPJ1

7 0
2 years ago
Other questions:
  • Using the quadratic formula I can't remember what to do next <br>​
    13·1 answer
  • At a bake sale, students sold 3 muffins for every 8 cookies.the students sold 24 muffins altogether. how many cookies did they s
    10·1 answer
  • if someone deposited 2000 at 6% simple intrest . how long will it be before she has 2600 in her account
    9·1 answer
  • Please help!!
    6·2 answers
  • I answered a question correctly and someone deleted my answer without giving me any explanation. I don't know why someone would
    9·2 answers
  • 2/4 added by 3/4 ...............................................................................................................
    13·2 answers
  • How many times greater is the value 0.55 than the value 0.0055?
    15·2 answers
  • (If A+B+C=180) <br>tan 2A + tan 2B + tan 2C = tan 2A tan 2B tan 2C​
    11·1 answer
  • The point (5,6) is the solution to which of the following systems of equations
    7·1 answer
  • Help pls, will choose brainliest if explanation is provided
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!