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
s344n2d4d5 [400]
3 years ago
13

PLS HELP ME I HAVE NO TIME

Computers and Technology
1 answer:
melisa1 [442]3 years ago
6 0
Please Help! Unit 6: Lesson 1 - Coding Activity 2
Instructions: Hemachandra numbers (more commonly known as Fibonacci numbers) are found by starting with two numbers then finding the next number by adding the previous two numbers together. The most common starting numbers are 0 and 1 giving the numbers 0, 1, 1, 2, 3, 5...
The main method from this class contains code which is intended to fill an array of length 10 with these Hemachandra numbers, then print the value of the number in the array at the index entered by the user. For example if the user inputs 3 then the program should output 2, while if the user inputs 6 then the program should output 8. Debug this code so it works as intended.

The Code Given:

import java.util.Scanner;

public class U6_L1_Activity_Two{
public static void main(String[] args){
int[h] = new int[10];
0 = h[0];
1 = h[1];
h[2] = h[0] + h[1];
h[3] = h[1] + h[2];
h[4] = h[2] + h[3];
h[5] = h[3] + h[4];
h[6] = h[4] + h[5];
h[7] = h[5] + h[6];
h[8] = h[6] + h[7]
h[9] = h[7] + h[8];
h[10] = h[8] + h[9];
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
if (i >= 0 && i < 10)
System.out.println(h(i));
}
}
You might be interested in
The _____________ loop allows the receiver to communicate with the sender in the imc process.
postnew [5]
Feedbacks
perhaps !!
<span>The feedback loop allows the receiver to communicate with the sender in the imc process.</span>
4 0
3 years ago
Do you remember your first 3D movie experience? What was the movie, what was the experience like, and why was it memorable? (If
maria [59]

Answer:

I went to my first 3d movie when I was 12. I remember thinking that it wouldnt look real or realistic but when I tried it out it was pleasantly surprised on how real it looked.

Explanation:

3 0
3 years ago
The ________ is a system of interlinked documents on the Internet, or a graphical user interface to the Internet that provides u
RSB [31]

Answer:

World Wide Web (WWW)

Explanation:

Popularly referred to as the Web is an information system that comprises of many interconnected web resources and documents. These documents and web resources possess a certain URL (Uniform Resources Locators) such as https://www.brainly.com/ which makes them accessible over the internet.

The <em>HTTP or Hypertext Transfer Protocol</em> is a channel for transferring the resources of the World wide web among users.

In 1989, the World Wide Web was invented by Tim Berners-Lee. He developed the first web browser in 1990.

The World Wide Web has played a fundamental role in the advancement of the information age as it is greatly used by different people around the world to communicate efficiently.

6 0
3 years ago
To display data in a certain manner, like alphabetical order, is called
taurus [48]

Answer:

D. Sorting

hope this helps!

6 0
3 years ago
Which networking devices forward incoming data between computer networks
Gnoma [55]

Answer: C,D

Explanation:

Wireless routers are commonly found in homes -- they're the hardware devices that Internet service providers use to connect you to their cable or xDSL Internet network. A wireless router, also called a Wi-Fi router, combines the networking functions of a wireless access point and a router.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Emily has to create an audio-visual presentation on animated movies. Which input device will she be LEAST likely to use while cr
    6·1 answer
  • You are part of a testing team at a software business. Your job is to see how many concurrent users the system can host and how
    7·1 answer
  • In the context of computer crimes, those who attempt to destroy the infrastructure components of governments and financial insti
    7·1 answer
  • American Standard Code for Information Interchange (ASCII) would be classified at which layer of the OSI Model?
    13·1 answer
  • Write an expression to print each price in stock_prices. Sample output with inputs: 34.62 76.30 85.05
    9·1 answer
  • Files exist on ____ storage devices, such as hard disks, dvds, usb drives, and reels of magnetic tape.
    11·1 answer
  • What option do you use to view your presentation?
    15·1 answer
  • Write a program that creates a Date object, sets its elapsed time to 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10
    9·1 answer
  • 2. You are developing a new application that optimizes the processing of a warehouse’s operations. When the products arrive, the
    10·1 answer
  • You have just purchased a new Dell PowerEdge R820 Rack Server. The server is equipped with four Xeon E5-4650 CPUs, 128 GB of RAM
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!