Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSC110- LOOP LAB I have a loop (repetition) lab. I am unsure on what I need to do and I do not know if all

CSC110- LOOP LAB

I have a loop (repetition) lab. I am unsure on what I need to do and I do not know if all of the coding needs to be on the same file or separate files. ALL CODING NEEDS TO BE DONE IN JAVA. I know that only one question can be asked at a time so I would like to know if this should all be one code or not. If it's all one code then I would like to include it as multipart questions to get the entire code for all parts.

image text in transcribed

image text in transcribed

THIS IS ALSO NEEDED FOR NUMBER 8:

image text in transcribed

image text in transcribed

CSC110-LOOP LAB Write a menu driven program to do each of the following. Continue to prompt the user with the menu until option 11 - Quit is selected PART I. SINGLE LOOPS Use the appropriate loop to do the following: 1. Write a WHILE LOOP that will print one row of 15 asterisks to the screen. 2. Write a FOR LOOP that will print one row of 15 asterisks to the screen 3. Write a DO-WHILE LOOP that will print one row of 15 asterisks to the screen 4. Display the odd numbers between 1 and 50. 5. Write a code segment that will prompt the user to enter a positive number, max. Verify the number is positive before continuing Display all integers from 1 to max. 6. Write a code segment that will prompt the user to enter a negative number, min. Verify the number is negative before continuing Display all integers from 1down to min. 7. Write a code segment that will prompt the user for a positive number, max and display a table of integers from 1 to max. Display only 5 integers in each row. For example, the user enters a max of 12. 1 2 3 4 5 6 78 9 10 12 Hint: Find the pattern as to when a newline needs to occur. (Use the modulus (%) operator and format the output using printf to align columns) PART II. NESTED for LOOPS LAB For problems 8-10, only one character (""or ") may be output at a time 8. Using the appropriate loops, write code that will display lines of asterisks. You should generate a random number between 5 and 25, inclusively to determine how many asterisks to display on a line. Continue to display the lines of asterisks until the random number, 16, is generated. Do not display the 16 asterisks. This will be the sentinel value to stop the loop(s). 10. * k* 11. Quit Include comments for each problem Submit LoopLab.java through Canvas. Page ZOOM + of 2 Thia progam ili dnotrata aingtRandan n:nbar ganarat.or the ther sad the inpu to crunch throgt the foras again ts praceaa rate: 2/21 2019 // set yp R :dom number er.:atc.c //Randem, gen _ nc Randon :22?) J t.he first val1 whi:ii ili oreste te sane li:t oubers EVERY t ie // seca with yoi: ennput.At's Cleek Page > of 2 -ZOOM // ra: qc ot 11 oc ssab-e rt valucs (-or - 2.321 um-gan.xtIna Syst:n.cut.pr:n nun: }; system-out-pr1 rt1n(" " ae of uaer will be 10 // *La.tiny rron D- Systea,est.prinlr system.ou. .prirtIn(" // g rete room numbers between 1-10 nun-ge.nextIn: 11 System.out-prirtlnn Systea.cut.prinlr nT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. Administrative services, such as wages.

Answered: 1 week ago

Question

What is the principle of thermodynamics? Explain with examples

Answered: 1 week ago

Question

Exposure to SQL desirable but not required

Answered: 1 week ago

Question

Strong analytical, communication, and problem-solving skills

Answered: 1 week ago