Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help me to solve this assignment as soon as possible and PLEASE USE JAVA CODING. Please complete it and Thank you in advance Assignment 1

Help me to solve this assignment as soon as possible and PLEASE USE JAVA CODING. Please complete it and Thank you in advance
image text in transcribed
Assignment 1 (CLO2) 1. Write a program using method to read two numbers and display the largest number. 2. Update the coding so that they can do the following: Assume that you would like to input a set of ten numbers consist of: 2 4 3 516 718 9. Largest number is known as max, next read the second number and call it num. Then compare max and num and store the larger number into max. Meaning max contains the larger number of the first 2 number. Next, read the third number, compare with the max and store the larger number into the max. Repeat the process for each remaining number in data set. At the end, max will contain the largest number in the data set. Given an algorithm: i) Read the first number and since it is the only number then first number is the max number. ii) Read the next number and store it in num. iii) Compare num with max. If max = num, discard num and do nothing. iv) Max now having the largest number, print it

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

3. Define cultural adaptation.

Answered: 1 week ago