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
A tool you might use to manipulate an image, such as a photograph, into a seamless repeating texture would be:
nika2105 [10]

I believe the answer is D. I hope I helped :)

7 0
2 years ago
Read 2 more answers
Which of these statements about tags is false?
Elenna [48]

Answer:

LOL i don't even know

Explanation:

3 0
2 years ago
True or false scientists investigate and seek to explain the natural world
weqwewe [10]
<h2>True</h2>

<h3>Reason;</h3>

We have got so many discoveries just bcoz of this investigation by scientists.

7 0
2 years ago
Universal Containers has implemented a strict software architecture for their custom Apex code. One of the requirements is that
maxonik [38]

Answer:

The required coding for the architect to meet these requirement has been described below.

Explanation:

The following ways will help the architecture to meet the requirement.

Create a reusable SOQLQueries class; specify “With Sharing” on the methods that require user context and “Without Sharing” on the methods requiring system context.

Create a SystemSOQLQueries class and a UserSOQLQueries class; set the “With Sharing” keyword on the UserSOQLQueries class and “Without Sharing” on the SystemSOQLQueries class.

6 0
3 years ago
Which two extensions in scratch are correctly matched to their accessibility goals
enyata [817]

The two extensions in scratch are correctly matched to their accessibility goals Translate extension and  Text to speech extension.

<h3>What are Scratch Extensions?</h3>

Scratch extensions are known to be used in an interface with external hardware and information outside of the Scratch website via new blocks.

Note that The two extensions in scratch are correctly matched to their accessibility goals Translate extension and  Text to speech extension.

Learn more about scratch  from

brainly.com/question/25720264

#SPJ1

4 0
1 year ago
Other questions:
  • What is the software called that allows the user to create, access, and manage a database? question 8 options:
    10·1 answer
  • How do I learn coding??? ​
    5·2 answers
  • What are the key ideas in dealing with a superior?
    9·1 answer
  • Explain what a wiki is and list its advantages.
    5·1 answer
  • Given a String variable named line1 and given a Scanner reference variable stdin that has been assigned a reference to a Scanner
    11·1 answer
  • Describe how the presence or absence of balance can affect a visitor’s perceptions of a Web page.
    7·1 answer
  • Explain how to utilize the computer in rooms management.​
    13·1 answer
  • What is the name for the size and style of text?
    8·2 answers
  • Which of the following statements holds true for the term plug-in? Group of answer choices It refers to a program (typically a m
    11·1 answer
  • What is the answer ????​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!