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
Plz help me<br> It’s due by tonight
natulia [17]

Answer:s

12 weeks

Step-by-step explanation:

if keith starts with $500 and wants to end with (at least) $200

he can withdrawn up to $500-$200=$300

if he withdraws $25 week the $300 will last $300 $25 week =12 weeks

5 0
3 years ago
Read 2 more answers
Need help for this please
EastWind [94]
The perimeter is about 82 yards

first, the perimeter of the rectangles is 30*2 = 60 (the 7 is not a part of the overall perimeter so we do not need to add it)

the "perimeter" (circumference) of the 2 semi circles = (22/7)*7 = 22by using the formula C = pi*d (2 semi circles of the same diamter = 1 circle)

now just add the 2 answers
22 + 60

= 82 yards
4 0
3 years ago
Explain how equal groups, multiplication, addition, and arrays related?
natulia [17]

Answer:

An arrangement of objects, pictures, or numbers in columns and rows is called an array. Arrays are useful representations of multiplication concepts. This array has 4 rows and 3 columns. It can also be described as a 4 by 3 array.

Step-by-step explanation:

hope this helps i looked it up if not im srry

4 0
3 years ago
Read 2 more answers
Round 25.84 to the nearest tenth.
Natalka [10]

when to the nearest tenth the answer will be 25.80

3 0
3 years ago
Read 2 more answers
Given m
Ronch [10]

Answer:

x + 80°= 180° ( angles made in straight line)

x = 180°-80°

x = 100°

hope it is helpful to you

6 0
3 years ago
Read 2 more answers
Other questions:
  • How many 1" cubes will pack into a regular box with dimensions 8" by 6" by 6.5"?
    15·1 answer
  • Does a two-digit number exist such that the digits sum to 9 and when the digits are reversed the resulting number is 9 greater t
    6·2 answers
  • A rectangular auditorium seats 1702 people. The number of seats in each row exceeds the number of rows by 9. Find the number of
    12·1 answer
  • Using 3.14 for pi calculate the circumference and area for the circle below​
    15·1 answer
  • How do you write 0.0002 in words
    5·2 answers
  • Can anyone help me with this math question ?in the picture above
    9·1 answer
  • In the data set below, what is the mean absolute deviation?
    15·1 answer
  • Put
    10·1 answer
  • Is the product of two irrational numbers always gonna be irrational
    11·1 answer
  • 5/8 of the students in
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!