Write a java program to find odd indexes of an array

Assignment Help Computer Engineering
Reference no: EM132200813

Question :

Write a Java program to find odd indexes of an array. Create a method to fill an array with 5 random elements between 1 and 50. Create another method to display odd indexes of the array.

Your output format MUST be exactly the same with the sample output below.

SAMPLE OUTPUT: SAMPLE OUTPUT II:

SAMPLE OUTPUT III: SAMPLE OUTPUT IV:

Array Elements: 23 46 41 38 44 Odd Indexes: 46 38

Array Elements: 36 27 36 3 21 Odd Indexes: 27 3

Array Elements: 37 50 40 14 1 Odd Indexes: 50 14

Array Elements: 37 18 9 42 20 Odd Indexes: 18 42

Reference no: EM132200813

Questions Cloud

Explain using the definition of an onto function : 1. Suppose f:Z? Z, with defined by f(x) = 3x2 + 3. Note that both the domain and the target are equal to Z, the set of all integers.
Create an object sending the array to the constructor : Write a JAVA program that asks the user to store 10 numbers in an array. You should then print the array in the order entered and then print in reverse order.
Find interest rate of present worth of the two payment plans : For winners of the California SuperLotto Plus, the choice is between a lump sum and annual payments that increase from 2.5% for the first year to 2.7%.
Assume there is only one mode : Given an array of names (stored as pointers to strings), use c++ program to print out the "mode", i.e., the name that appears the most times in the array
Write a java program to find odd indexes of an array : Write a Java program to find odd indexes of an array. Create a method to fill an array with 5 random elements between 1 and 50.
Show data changing over time and why : Explain what types of graphs would be appropriate to show data changing over time an
Network monitor and a protocol analyzer : What are the similarities and differences between a network monitor and a protocol analyzer?
Graphically decompose the total effect of the price : Graphically decompose the total effect of the price decrease into the substitution and income effects on a well-annotated graph. Make sure you clearly label.
Compute the intersection of two arrays of integers : Write java program to implement the algorithm that computes the intersection of two arrays of integers using two different data structures.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a query to show the number of orders for each shipper

Write a query to show number of products in each product category. Your query should show Category name and number of products in that category.

  Data representation and logic

Representing Text and Numbers, Binary Arithmetic, Interpreting Logical Statements, Logic Puzzle, Binary and Algorithms.

  Classification with neural networks

COSC2110/COSC2111 Data Mining - Describe the data encoding that is required for this task. How many outputs and how many inputs will there be

  Write a method that will traverse a linked B-tree

Write a method that will traverse a linked B-tree, visiting all its entries in order traversal of keys (smaller keys first).

  Write a recursive algorithm whose parameters are integers

Write a recursive T(n lg n) algorithm whose parameters are three integers x, n, and p, and which computes the remainder when x n is divided by p.

  What situation is that you intend to improve usually

What you plan to accomplish and why, include an overview of situation or organization and what situation/problem is that you intend to improve - usually 1-2 page) Cite and support all content appropriately Should include.

  What are the limitations of sentiment analysis applications

What are the limitations of sentiment analysis applications? Describe the pressures experienced by company. How the organization responded to those pressures.

  How to developing an information management framework

List and describe the steps involved in developing an Information Management framework.

  What type of flip-flop should c be made of

In your design in Problem, what happens if both the control signals are at 0 and a clock pulse comes along? Redesign the circuit (if necessary).

  Discuss the special instructions for use with small literals

The 68000 has special instructions for use with small literals (e.g., MOVEQ and ADDQ). Some assemblers do not acknowledge these instructions explicitly.

  Implement a mips asm program that requests for three numbers

Implement a MIPS asm program that requests for three numbers from the user. Month, Day, and Year. You may assume that a valid date is given.

  Write an expression that evaluates to true

Write an expression that evaluates to True if at least one of the variables is True and evaluates to False otherwise.

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