Question: Java programming PART 1 Create a word document FA2017LAB5_PARTI_yourlastName.docx then ang Owing questions: 1. Initialize an int variable named as sum to 0. Write the

 Java programming PART 1 Create a word document FA2017LAB5_PARTI_yourlastName.docx then ang

Java programming

PART 1 Create a word document FA2017LAB5_PARTI_yourlastName.docx then ang Owing questions: 1. Initialize an int variable named as sum to 0. Write the while loop that lets the user enter a number The number should be added to sum and the result is stored back to the variable sum. The loop should iterate as long as sum contains a value less than 200. After the loop stop, display message: "sum = value of sums - the loop stops" 2. .write a do-while loop that asks the user to select a task from the following menu to continue; 1. Task 1 2. Task 2 3. Task 3 0. Exit Read the task selected from the keyboard then write the switch statement: For task 1, display the message "Task 1 process" For task 2, display the message "Task 2 process" For task 3, display the message "Task 3 process For task 0, display the message "Terminate the program The do.. while loop ends when users select 0 from the menu Write a for loop that displays the following set of numbers: 4, 7, 11, 16, 22, 29, 38, 47, 57, 58, 80, 93, 107, 122, 138, 155, 173, 192, 222, 243 Write code that does the following: Opens a file named numbers.txt, uses a loop to write the odd numbers from 1 through 200 to the file and then close the file Write the code that does the following: Open the file numbers.txt created in the question Read all of the numbers from the file Count how many numbers in the file (store in the variable count) add all these numbers (store in the variable sum) close the file numbers.txt display the message: There are count numbers Sum of them is: sum E A N T P

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!