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
15/124 x 230/30 divided by 230/124
pentagon [3]

Answer: 15/124 x 230/30 divided by 230/124 = 0.5

hope this helps

6 0
3 years ago
Read 2 more answers
Convert binary into octal number system<br>(1011010)<br>(1010111)​
stiv31 [10]

the number 1010111 in binary is equivalent to 127 in octal.

the number 1011010 in binary is equivalent to 132 in octal.

6 0
3 years ago
Solve the inequality -1+4y&lt;_31.
valina [46]

Answer:

\large\boxed{y\leq8\to\{y\ |\ y\leq8\}\to y\in(-\infty,\ 8]}

Step-by-step explanation:

-1+4y\leq31\qquad\text{add 1 to both sides}\\\\-1+1+4y\leq31+1\\\\4y\leq32\qquad\text{divide both sides by 4}\\\\\dfrac{4y}{4}\leq\dfrac{32}{4}\\\\y\leq8

3 0
3 years ago
Help with this question!!! ASAP
sergij07 [2.7K]

Answer:Im pretty sure it's quadratic

Step-by-step explanation:

The reason is because if you plot these on a graph they would make a "U" shape witch mean it's a parabola if it were exponential it would not make a "u" shape because it would keep going up and never come back down at a exponential rate.

3 0
3 years ago
Help Me With These Please
Sloan [31]
 1: a. 20:1
4:  b. 3b
5:b. h/g=5/6
6 0
4 years ago
Read 2 more answers
Other questions:
  • It's the holiday season and you are working for a packing company that specializes in holiday fruit cakes. For Christmas this ye
    14·2 answers
  • Is 39500 one hundred times 3950?
    9·1 answer
  • Should this answer be a fraction or a whole number?
    14·1 answer
  • Help with questions, I don't care if you google it
    13·1 answer
  • Which phrase is represented by the expression 5 (36 + 9)?
    13·1 answer
  • Ariana invested $7500 in an account paying in interest rate of 2.9% compounded continuously assuming no deposits or withdrawals
    13·2 answers
  • Find the total surface area of the triangular pyramid
    8·1 answer
  • Solve for i<br><br> 3 (.5i - 6 ) = 12
    14·1 answer
  • Half of Ethan string is equal to 2/3 of Kayla stream the total length of the string is 10 feet how much longer is Ethan string K
    14·1 answer
  • PLEASE HELP i have to turn this at the end of the day! PLEASE DONT GUESS! :)
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!