##### Use CA10RAM to get 10%* Discount. (5/5)

### find the maximum and minimum of four numbers. You need to use if then else conditional statement or its short form (example max = (a>b? a: b);) to find these values

INSTRUCTIONS TO CANDIDATES

CPSC 130 (17663, 14154)

Introduction to Computer Programming

MD Minhaz Chowdhury

Programming Assignment 4

Chapter 3

Objective of the Assignment

In this exercise, we will find the maximum and minimum of four numbers. You need to use if then else conditional statement or its short form (example max = (a>b? a: b);) to find these values.

Total Score: 20

Write a program that finds the maximum and minimum of four numbers. The input numbers can be hard coded or can be given from input (there is no restriction on input read in this problem). Your program shall print the maximum and minimum of these four numbers. You need to use if then else conditional statement to find these values.

Example: if you have numbers -1, 5, 100, 0 then your program’s output shall look like this:

First number: -1

Second number: 5

Third number: 100

Fourth number: 0

Maximum of the numbers: 100

Minimum of the numbers: -1

1. Print the result as described: score 2
2. Use of if then else conditional statement: score 10

Total: 14 for the code part.

Note: Submission of the assignment using a word or pdf file that follows the given format. If you do not use, follow the given template format then your score will be zero. You must mention your name, course number, course section number (or schedule, example MWF 10 am) in the assignment and any email related to the assignment. If you email does not contain any of the mentioned information, then your email will be considered as not acceptable

What to Submit

You must submit a document whose template is given below. Your score can not be confirmed if you just sent screenshots in the email or upload at D2L. You need to put the screenshots and code in the template. In that template put the following items:

1. Copy and paste your java code at the designated place. Do not put screenshot here, rather copy and paste the code. (Program code section) (score 14).
2. Output Screenshots: you will put four different input for three different run of your program (total four runs, one input at each run). We will call each of these run a test case. Your given template has “Test Case 1”, “Test Case 2”, “Test Case 3”. Each test case has input and output section. In input section type the input and in the output section copy paste the screenshot of your program (score 2×3 = 6).

Total: 14 + 6 = 20

(5/5)

## Related Questions

##### . Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

##### . The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

##### . Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

##### . SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

##### . Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

### Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed ##### AyooluwaEducation
(/5)

Hire Me ##### RIZWANAMathematics
(/5)

Hire Me (/5) 