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
Write as an algebraic expression, inequality, or equation:
Strike441 [17]

That inequality can be written as

q¹⁴ < 15

8 0
4 years ago
Given the function y=log3(x+2)-2. List the transformations
slava [35]

Answer:

Exponential transformation.

Step-by-step explanation:

y = log_3 (x + 3) - 2

To transform this into exponential, we have:

Adding 2 to both sides

y + 2 = log_3 (x + 3)

3^(y + 2) = x + 3

x = 3^(y + 2) - 3

4 0
3 years ago
A bag of numbered lottery balls contains the numbers 1 through 40. What is the probability that a randomly selected ball will be
RoseWind [281]

Answer:

37/40

Step-by-step explanation:

There are 3 numbers between 1 and 40 that are a multiple of 13: 13,26,39.

So, your probability should be 40-3/40, = 37/40.

3 0
3 years ago
Read 2 more answers
What is the order of rotational symmetry of a kite?<br> A) 0 <br> B) 1 <br> C) 2 <br> D) 4
KIM [24]
The order of rotational symmetry of a kite is 1
5 0
3 years ago
PLEASSSSSEEE NEED HELP ASAP ALOT OF POINTS BIGGG POINTS PLEASSSS
Elena-2011 [213]
2. x = 8, -4
|x-2|
2 * x-2=12
2x-4=12
2x=16
x=8
-4 - 2 = -6
-6 x 2 = 12
3 0
3 years ago
Other questions:
  • Which statement best describes the polynomial? 13y8 -4y7 +3y
    13·2 answers
  • Help idk how to do this
    15·1 answer
  • Solve for x: 12x +16y = 6
    5·1 answer
  • Write y=1/6x+7 in standard form using intergers.​
    15·1 answer
  • Sophia had 63¢ until she spent 5 nickels. How much money does Sophia have now?
    14·2 answers
  • The diameter of a circle is 200 cm.
    12·1 answer
  • state the slope and y-intercept for the graph of the equation y=-3x+5state the slope and y-intercept for the graph of the equati
    14·1 answer
  • Which rational number equals 0.3?
    13·2 answers
  • The circumference of a circle is
    7·1 answer
  • Can someone help me if they really know the answer pls!!
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!