Writing a program in java about assigning integer values

Assignment Help Basic Computer Science
Reference no: EM13829425

Problem:

Write a program to assign the integer values 1 through 25 to a 25-element integer array. Then, print the array as five separate lines, each containing five elements separated by commas. The last element on each line should be followed by a newline instead of a comma. The output of your program should appear exactly as follows:

1,2,3,4,5
6,7,8,9,10
11,12,13,14,15
16,17,18,19,20
21,22,23,24,25

Hints:

One way to determine every 5th element is to use the modules operator (%). If you divide the subscript by 5 and the remainder is 0, it is the 5th number.

You can use System.out.print() to print a value without a newline following it. This allows you to print multiple things on the same line.

You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program. You are to submit the following deliverables to the Assignment Dropbox in a single Microsoft Word file:

a. A screen snapshot of your Java source code (just the beginning is OK) as it appears in your IDE (e.g., jGRASP, Net Beans, Eclipse, etc.) or editor (e.g., a Windows Command line more of the .java file's first screen).

b. A listing of your entire Java source code in the same Microsoft Word file as item a), and following item a). You can simply copy and paste the text from your IDE into Microsoft Word. Be sure to maintain proper code alignment by using Courier font for this item.

c. A screen snapshot of your program's output in the same Microsoft Word file, and following item b).

Additional Information:

The question is from Computer Science and it explains about writing a program in Java about assigning integer values 1 through 25 to a 25 element integer array. The source code for program has been given in the solution.

Reference no: EM13829425

Questions Cloud

Annual rate of return with semi-annual compounding : How many years will it take for a investment to be worth $8,023.53 in the future, with a deposit today of $5,000 at a 6% annual rate of return with semi-annual compounding?
Concept of required return on proposed capital investments : Explain the theory behind the concept of "required return" on proposed capital investments.
The foregoing transactions using accounting equation : Here is a list of transactions for a newly-formed corporation that provides professional tax services: Organized the business as a professional corporation, investing $28,000 cash in the business and issuing 1,000 shares of no-par common stock. Recei..
Case study in strategic plan adelphi art centre : Case Study in Strategic Plan Adelphi Art Centre
Writing a program in java about assigning integer values : Write a program to assign the integer values 1 through 25 to a 25-element integer array. Then, print the array as five separate lines, each containing five elements separated by commas.
Implementation of it and it goals of organization : You will conduct an evaluation of the business goals of DynCorp International. Prepare a mapping of IT goals for DynCorp International that will support the business goals.
Describe the importance of a child to have someone : The question is related to Sociology and the question describe the importance of a child to have someone to set an example or be a role model.
Provide adequate planning capability : Identify the data that should be incorporated into CGC's new system to provide adequate planning capability. Explain why each data item it is important and the level of detail needed for the data to be useful.
Management question legal environment of business : Management Question Legal Environment of Business

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Describe the major components of a datawarehouse

Briefly describe the major components of a datawarehouse architecture. Explain how the volatility of a datawarehouse is different from the volatility of a database for an operational information system. Please cite sources if any used.

  Database and data warehousing design

Assignment consists of two (2) sections: a design document and a revised project plan. You must submit both sections as separate files for the completion of this assignment. Label each file name according to the section of the assignment it is ..

  International standards organization

As the CIO of a company engaged in business today, one of the main areas of focus is data protection. Discuss the key data protection points that must be taken into consideration prior to a strategy plan and policy being established for a company

  Explain the costs involved in the creation of the system

Explain the costs involved in the creation of the system. Describe the ongoing maintenance that will be required.

  What strategies appeal most to you summarize your ideas

Research recruiting and retention strategies at three different companies. What distinguishes one company from another in this area?

  What are the pro and con of digital rights managment

What are the pro's and con's of Digital Rights Managment?

  How many memory banks are needed

How many memory banks are needed so that a stream of loads can, on average, require only one cycle per load?

  Task manager to recognize and troubleshoot problems

Which system resources are probable to be at root of problem? How can you use system tools, like the Task Manager, to help recognize and troubleshoot these problems?

  Determine the actual bits sent by the sender

Determine the actual bits sent by the sender? Include some idleness bits before and after the frame. Let bit-stuffing (also known as bit-insertion).

  Explain one 1 way in which a gui can take merits of

gui and multithreading please respond to the followingbull describe one 1 way in which a gui can take advantage of

  Show how mips can implement the instruction swap

Show how MIPS can implement the instruction swap $rs $rt, which swaps the contents of registers $rs and $rt. Consider the case in which there is an available register.

  Find crc using modulo two arithmetic or polynomials

For a pattern P = 10011, and a message D = 10010011011, find, using modulo 2 arithmetic or polynomials, the CRC, then the string T to be transmitted.

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