Write a program to assign the integer values

Assignment Help Programming Languages
Reference no: EM13782835

1. 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.

2. 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).

Your instructor will compile and run your program to verify that it compiles and executes properly. You will be evaluated on (in order of importance):

·Inclusion of all deliverables in Step #2.
·Correct execution of your program.
·Adequate commenting of your code.
·Good programming style (as specified in the textbook's examples).
·Neatness in packaging and labeling of your deliverables.

Deficiencies in any of the above areas are subject to deductions in each area, based on the severity of the deficiency.

Reference no: EM13782835

Questions Cloud

You are the total rewards director for a large domestic manu : You are the total rewards director for a large domestic manufacturing company. The CEO has announced that they will be opening a new foreign production plant next year in Mexico. This new plant needs to be up and running by the deadline set by the CE..
Conduct a differential analysis regarding special order : Conduct a differential analysis regarding special order. Would you accept this order under the conditions provided? Explain and defend your position.
project on Capstone : Financial management, quality and marketing aspects of the organization
Calculate aggregate expenditure in equilibrium : Calculate aggregate expenditure in equilibrium where E=Y Calculate and interpret the individual and combined effects of changes to X0 and M0 such that X0 = 150 and M0 = 150 and all other variables remain unchanged. Also, calculate and interpret th..
Write a program to assign the 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
Explain the nature versus nurture debate : Is human sexuality inborn or socially constructed?
Examine the future aspects of the specific agency : Identify and outline a specific plan on how this degree will help you achieve your goals into a job opportunity or job advancement. Examine the future aspects of the specific agency or field you wish to go into
Depth description of the drug krokodil : Write an in depth description of the drug Krokodil (Desomorphine)** Be sure to incorporate answers to all of the following questions within the paper.
Perspectives of dr karen head and thomas friedman : Comparison-contrast essay on the perspectives of Dr. Karen Head and Thomas Friedman on the effectiveness of online writing courses.

Reviews

Write a Review

 

Programming Languages Questions & Answers

  Write a program to find the largest of five numbers

Replace each phrase containing "Until" with an equivalent phrase containing "While", and vice versa. For instance, the phrase (Until sum = 100) would be replaced by (While sum 100).

  Pseudocode that will generate reports from data files

Develop a mock-up of each of these reports, and get customer approval of these mock-ups. Write pseudo code that will generate these reports from the data files, using a CASE tool;

  Calculate resistance value

Develop a PROLOG program that prompts the user for the colors of Band 1, Band 2, Band 3, and Band 4 and then displays the resistance in Kilo-ohms.

  Creating printstream object using dos

Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.

  Determine the output displayed in the list box

Determine the output displayed in the list box by the lines of code

  Write the program to display company-s payroll report

Write down the program to display company's payroll report in list box. The program must read each employee's name, hourly rate, and hours worked from file and produce report in a table format.

  Program for vehicle registration department

Consulting firm has narrowed the choice of programming language to Java and C#. Which language do you believe would be more suitable for this application and why?

  Use of various bash commands

Assignment On: This work will require scripting the use of various bash commands and / or small programs that involve directory and file structures.

  Arithmetic and application of summaries

Write some R code that carries out computation, but do it with a single R expression that contains no commas (,) and no braces ({}).

  Implement two different versions of file copy utility

You will implement two different versions of file copy utility, one by using read()/write() operations and one by using mmap(). You are only prmitted to use following system calls:

  Create user friendly application-display name-button clicked

Create a user friendly application which can do the following: displays the name and address when button is clicked and permit user to choose a state, and when a user clicks a button.

  Design interactive program using prewritten methods

Design an interactive program that does the following, using the prewritten methods whenever they are appropriate. Prompt the user for and read a library card number, which must be between 1000 and 9999.

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