How to get how to get the output

Assignment Help JAVA Programming
Reference no: EM131069263

Code:

int [] a={1,2,4,0,0,0,0};

for(int i=3;i<7;i++)

{
a[i]=a[i-1]+a[i-2]*2+a[i-3]*3;
System.out.print(a[i]+" ");
}

the output is 11 25 59 142 and

Please explain in steps on how to get the output.

Reference no: EM131069263

Questions Cloud

Section of the companies act of kenya : What section of the Companies Act of Kenya 2015 allows Auditors to carry out investigation to form an opinion on propriety of financial records.
Problem regarding the stem cell research : Stem cell research is a highly controversial topic. It is often made all the more controversial when discussing embryonic stem cell research. Write a three-page research assignment on stem cells. For this, you need to research the different forms ..
Create three new threads : Write a program (in C, or Java, or C++, or C#) that creates three new threads (besides the already existing main thread) and synchronizes them in such a way that each thread displays it's thread id in turn for 5 iterations
Introduction to film qualifies as a course : Introduction to Film qualifies as a course that partially fulfills a student's LACC requirement. By the end of the course, students will: 1) be familiar with film as an art form that reflects the cultural context in which it was created, primaril..
How to get how to get the output : how to get the output of the java program.  Please explain in steps on how to get the output.
Write an appropriate expression for total potential energy : Assuming the rotation of the beam is small, write an appropriate expression for the total potential energy of the system and use the minimum potential energy theorem to determine the equation of equilibrium
Flat structure tree diagrams : I. Draw the flat structure tree diagrams for the following sentences. (You are not requiredto draw x-bar trees.)
What does conclusion mean for how in public administration : A great debate continues on whether leadership can be learned or if it is something someone is born with. Consider whether or not you believe the kind of leadership necessary for leading and inspiring the participants in a community collaboration ..
Lighter elements of paul muldoon style : How do the serious and lighter elements of Paul Muldoon's style combine together to create poems that are both odd and unique?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Consider the following conditions

Consider the following conditions: An enqueuer waiting on a full-queue or a dequeuer waiting on an empty queue sleep indefinitely, unless woken up by another thread. A thread must send a signal ONLY when it adds an element to an empty queue or remove..

  String copy and string concatenation functions

Write the string copy and string concatenation functions -  Append n characters from string2 to stringl by using pointer arithmetic

  Application using arrays to manage personal financial record

design a Java application using arrays to manage personal financial records which include expenditures and incomes.

  Create a fully complete educational mobile game

You will individually create a fully complete educational (school-age) mobile game using mobile web design skills. You will submit your completed application's project folder as a zip file

  Allows a user to select a favorite basketball team

Write an application that allows a user to select a favorite basketball team from a list box. Include at least five teams in the list, and display the chosen team in a text field after the user makes a selection. Save the file as JBasketball.java. :

  Creation of a virtual world java application

Implement classes that meet the given specifications of object instance variables and behaviors and create operative algorithms using sequential logic structures, decision control structures, and loops

  Your task for this project is to design a program to help a

your task for this project is to design a program to help a videorental store operatorrecord clients transactions. the

  Write a bash script larger x y that compares the sizes

Write a bash script larger X Y that compares the sizes of two specified files X and Y, and reports which file is larger. For example, if X is larger, the output should be "File X is larger", while if Y is larger, the output should be "File Y is la..

  Use java or c++ to create a program for making the pizza

Make the Pizza example abstract, so that there are three kinds of factories under one AbstractPizzaFactory You can use Java or C++

  Provide a java class named "input" containing method readint

Provide a Java class named "Input" containing the method "readInt" (prototype given below) that displays the prompt string, reads an integer, and tests whether it is between the supplied minimum and maximum. If not, it prints an error message and ..

  Correct example of inheritance

Which of the following relationships is not a correct example of inheritance?  Parent to Children  Aunt to Uncle  Grandparent to Grandchild

  Develop a test plan for testing the bankloan class

Create a class named BankLoan which will represent information about a loan a person wants to get from the bank, to purchase a car, a house, or some other expensive item, and they will pay back gradually over time.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd