Practice Writing Code with Loops Project

Computer Science I Section 8BG Spring 2021 CO LD Coding Lab 6 Instructions Lab Instructions In this lab, you will practice writing code with loops, including nested loops. Technology Requirements To complete this lab, you will need to have Java and Eclipse installed on your computer. Procedure Read the attached Word document for further instructions. Take a screenshot of the successful run of your program with the program’s output. Put the screenshot and a copy of your code in a Word document for submission to the Coding Lab 6 Assignment Box. NOTE: Include your Java files with your submission. Submission Format Any citation sources used should be properly cited in MLA format. Use the following format when naming your file: your First Initial and Last Name with the Assignment Name. For example: JDoeCodingLab6.docx. Grading Criteria This assignment is worth 100 points. Due Date Your submission is due by 11:59 PM on April 17, 2021. sampleSubmission.pdf (122.98 KB) lab6_instructions.pdf (138.85 KB) Submissions No submissions yet. Drag and drop to upload your assignment below. Drop files here, or click below!

Upload Record Choose Existing You can upload files up to a maximum of 1 GB. Activity Details Task: Submit to complete this assignment Due April 17 at 11:59 PM Name Date Assignment Name public class codingLabe2 { public static void main(String[] args) { // create the floating-point numbers float first = 1.5f; float second = 2.0f; // multiple the two numbers float product = first * second; } } // print out the final product System.out.println(“The product is: ” + product); LAB 6 In this lab you will practice writing code with loops, including nested loops. Warm-up exercises:

1. •Write a program that adds numbers between 1 to 100 and prints the result. Do it three times, use for loop, then while loop, then do-while loop.

2. •Write a program that prints numbers from 0 down to -100. Use while loop.

3. •Write a program that adds numbers between 100 to 200 and prints the result. Use dowhile loop.

4. •Write a program that adds odd numbers between 1 to 100 and prints the result. Use while loop.

5. •Write a program that averages even numbers between 5 to 30 and prints the result. Use do-while loop. Nested for loops. Any of the loops you have learned could be nested within each other. Remember, that inside any loop we can have any statement (for example, printing statement is very common), including loop. One of the most common JAVA language constructs is having for loops nested two or three times. Here we are going to explore two for loops nested structure. Copy-paste and run the following example that uses nested for loops. int n = 5; for (int line = 1; line

Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at EssayBell.com

Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at EssayBell.com. We assure you of a well written and plagiarism free papers delivered within your specified deadline.