SlideShare uma empresa Scribd logo
1 de 1
Baixar para ler offline
Find the smallest value.
In this task you have been given code that asks the user to enter 3 whole numbers, and stores
these in an array. Your task is to identify the smallest of the three values in the array. You should
store the result in a variable called smallest, so that it can be printed out. Please note: You can
(and should) solve this task without sorting the array or using the Arrays utility class.
import java.util.Scanner ;
public class Smallest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in) ;
int[] values = new int[3] ;
System.out.println("Please enter three whole numbers (one per line)");
values[0] = input.nextInt();
values[1] = input.nextInt();
values[2] = input.nextInt();
//Your code here
System.out.println("The smallest value is " + smallest) ;
}
}

Mais conteúdo relacionado

Semelhante a Find the smallest value In this task you have been given co.pdf

JAVA Question : Programming Assignment
JAVA Question : Programming AssignmentJAVA Question : Programming Assignment
JAVA Question : Programming AssignmentCoding Assignment Help
 
Create a menu-driven program that will accept a collection of non-ne.pdf
Create a menu-driven program that will accept a collection of non-ne.pdfCreate a menu-driven program that will accept a collection of non-ne.pdf
Create a menu-driven program that will accept a collection of non-ne.pdfrajeshjangid1865
 
CountPositiveNumbersInArray.javapackage org.students;import java.pdf
CountPositiveNumbersInArray.javapackage org.students;import java.pdfCountPositiveNumbersInArray.javapackage org.students;import java.pdf
CountPositiveNumbersInArray.javapackage org.students;import java.pdfaparnatiwari291
 
Lab Task 2Use the below code and fill it in where appropriate to .pdf
Lab Task 2Use the below code and fill it in where appropriate to .pdfLab Task 2Use the below code and fill it in where appropriate to .pdf
Lab Task 2Use the below code and fill it in where appropriate to .pdfpmajanta
 
Intro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technologyIntro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technologyworldchannel
 
Class notes(week 4) on arrays and strings
Class notes(week 4) on arrays and stringsClass notes(week 4) on arrays and strings
Class notes(week 4) on arrays and stringsKuntal Bhowmick
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerAiman Hud
 
Computer java programs
Computer java programsComputer java programs
Computer java programsADITYA BHARTI
 

Semelhante a Find the smallest value In this task you have been given co.pdf (12)

JAVA Question : Programming Assignment
JAVA Question : Programming AssignmentJAVA Question : Programming Assignment
JAVA Question : Programming Assignment
 
Create a menu-driven program that will accept a collection of non-ne.pdf
Create a menu-driven program that will accept a collection of non-ne.pdfCreate a menu-driven program that will accept a collection of non-ne.pdf
Create a menu-driven program that will accept a collection of non-ne.pdf
 
CountPositiveNumbersInArray.javapackage org.students;import java.pdf
CountPositiveNumbersInArray.javapackage org.students;import java.pdfCountPositiveNumbersInArray.javapackage org.students;import java.pdf
CountPositiveNumbersInArray.javapackage org.students;import java.pdf
 
Lab Task 2Use the below code and fill it in where appropriate to .pdf
Lab Task 2Use the below code and fill it in where appropriate to .pdfLab Task 2Use the below code and fill it in where appropriate to .pdf
Lab Task 2Use the below code and fill it in where appropriate to .pdf
 
Intro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technologyIntro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technology
 
6_Array.pptx
6_Array.pptx6_Array.pptx
6_Array.pptx
 
Arrays in C++
Arrays in C++Arrays in C++
Arrays in C++
 
Class notes(week 4) on arrays and strings
Class notes(week 4) on arrays and stringsClass notes(week 4) on arrays and strings
Class notes(week 4) on arrays and strings
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
 
Computer java programs
Computer java programsComputer java programs
Computer java programs
 
CH1 ARRAY (1).pptx
CH1 ARRAY (1).pptxCH1 ARRAY (1).pptx
CH1 ARRAY (1).pptx
 
3.Lesson Plan - Input.pdf.pdf
3.Lesson Plan - Input.pdf.pdf3.Lesson Plan - Input.pdf.pdf
3.Lesson Plan - Input.pdf.pdf
 

Mais de rchopra4

For effect of temperature on microbial growth exercise 28 w.pdf
For effect of temperature on microbial growth exercise 28 w.pdfFor effect of temperature on microbial growth exercise 28 w.pdf
For effect of temperature on microbial growth exercise 28 w.pdfrchopra4
 
For Eosin Methylene Blue Agar what results would you be loo.pdf
For Eosin Methylene Blue Agar what results would you be loo.pdfFor Eosin Methylene Blue Agar what results would you be loo.pdf
For Eosin Methylene Blue Agar what results would you be loo.pdfrchopra4
 
For each of the languages L a b below use the pumping l.pdf
For each of the languages L  a b below use the pumping l.pdfFor each of the languages L  a b below use the pumping l.pdf
For each of the languages L a b below use the pumping l.pdfrchopra4
 
For each of the following scenarios state whether the situa.pdf
For each of the following scenarios state whether the situa.pdfFor each of the following scenarios state whether the situa.pdf
For each of the following scenarios state whether the situa.pdfrchopra4
 
For each of the below items be sure to write your code in S.pdf
For each of the below items be sure to write your code in S.pdfFor each of the below items be sure to write your code in S.pdf
For each of the below items be sure to write your code in S.pdfrchopra4
 
For customer service providers information learned about be.pdf
For customer service providers information learned about be.pdfFor customer service providers information learned about be.pdf
For customer service providers information learned about be.pdfrchopra4
 
For Apple Inc AAPL Caterpillar CAT Consolidated Edis.pdf
For Apple Inc AAPL Caterpillar CAT Consolidated Edis.pdfFor Apple Inc AAPL Caterpillar CAT Consolidated Edis.pdf
For Apple Inc AAPL Caterpillar CAT Consolidated Edis.pdfrchopra4
 
For bacteria the primary issue with UV light exposure is th.pdf
For bacteria the primary issue with UV light exposure is th.pdfFor bacteria the primary issue with UV light exposure is th.pdf
For bacteria the primary issue with UV light exposure is th.pdfrchopra4
 
For any of the questions below do not do math If there ar.pdf
For any of the questions below do not do math  If there ar.pdfFor any of the questions below do not do math  If there ar.pdf
For any of the questions below do not do math If there ar.pdfrchopra4
 
For a test of H0p050 the z test statistic equals 251 U.pdf
For a test of H0p050 the z test statistic equals 251 U.pdfFor a test of H0p050 the z test statistic equals 251 U.pdf
For a test of H0p050 the z test statistic equals 251 U.pdfrchopra4
 
For a review session in preparation for an animal diversity .pdf
For a review session in preparation for an animal diversity .pdfFor a review session in preparation for an animal diversity .pdf
For a review session in preparation for an animal diversity .pdfrchopra4
 
For a random variable XVX was calculated to be 1 Is the.pdf
For a random variable XVX was calculated to be 1  Is the.pdfFor a random variable XVX was calculated to be 1  Is the.pdf
For a random variable XVX was calculated to be 1 Is the.pdfrchopra4
 
For 37 years Janet saved 250 at the beginning of every mon.pdf
For 37 years Janet saved 250 at the beginning of every mon.pdfFor 37 years Janet saved 250 at the beginning of every mon.pdf
For 37 years Janet saved 250 at the beginning of every mon.pdfrchopra4
 
For 21 years Janet saved 850 at the beginning of every mon.pdf
For 21 years Janet saved 850 at the beginning of every mon.pdfFor 21 years Janet saved 850 at the beginning of every mon.pdf
For 21 years Janet saved 850 at the beginning of every mon.pdfrchopra4
 
For 39 years Janet saved 450 at the beginning of every mon.pdf
For 39 years Janet saved 450 at the beginning of every mon.pdfFor 39 years Janet saved 450 at the beginning of every mon.pdf
For 39 years Janet saved 450 at the beginning of every mon.pdfrchopra4
 
Following is the pea plant characteristics and the location .pdf
Following is the pea plant characteristics and the location .pdfFollowing is the pea plant characteristics and the location .pdf
Following is the pea plant characteristics and the location .pdfrchopra4
 
For 20Y2 McDade Company reported a decline in not income A.pdf
For 20Y2 McDade Company reported a decline in not income A.pdfFor 20Y2 McDade Company reported a decline in not income A.pdf
For 20Y2 McDade Company reported a decline in not income A.pdfrchopra4
 
For 27 years Janet saved 900 at the beginning of every mon.pdf
For 27 years Janet saved 900 at the beginning of every mon.pdfFor 27 years Janet saved 900 at the beginning of every mon.pdf
For 27 years Janet saved 900 at the beginning of every mon.pdfrchopra4
 
For 14 years Janet saved 800 at the beginning of every mon.pdf
For 14 years Janet saved 800 at the beginning of every mon.pdfFor 14 years Janet saved 800 at the beginning of every mon.pdf
For 14 years Janet saved 800 at the beginning of every mon.pdfrchopra4
 
For 100 births P exactly 57 girls 00301 and P57 or mor.pdf
For 100 births P exactly 57 girls 00301 and P57 or mor.pdfFor 100 births P exactly 57 girls 00301 and P57 or mor.pdf
For 100 births P exactly 57 girls 00301 and P57 or mor.pdfrchopra4
 

Mais de rchopra4 (20)

For effect of temperature on microbial growth exercise 28 w.pdf
For effect of temperature on microbial growth exercise 28 w.pdfFor effect of temperature on microbial growth exercise 28 w.pdf
For effect of temperature on microbial growth exercise 28 w.pdf
 
For Eosin Methylene Blue Agar what results would you be loo.pdf
For Eosin Methylene Blue Agar what results would you be loo.pdfFor Eosin Methylene Blue Agar what results would you be loo.pdf
For Eosin Methylene Blue Agar what results would you be loo.pdf
 
For each of the languages L a b below use the pumping l.pdf
For each of the languages L  a b below use the pumping l.pdfFor each of the languages L  a b below use the pumping l.pdf
For each of the languages L a b below use the pumping l.pdf
 
For each of the following scenarios state whether the situa.pdf
For each of the following scenarios state whether the situa.pdfFor each of the following scenarios state whether the situa.pdf
For each of the following scenarios state whether the situa.pdf
 
For each of the below items be sure to write your code in S.pdf
For each of the below items be sure to write your code in S.pdfFor each of the below items be sure to write your code in S.pdf
For each of the below items be sure to write your code in S.pdf
 
For customer service providers information learned about be.pdf
For customer service providers information learned about be.pdfFor customer service providers information learned about be.pdf
For customer service providers information learned about be.pdf
 
For Apple Inc AAPL Caterpillar CAT Consolidated Edis.pdf
For Apple Inc AAPL Caterpillar CAT Consolidated Edis.pdfFor Apple Inc AAPL Caterpillar CAT Consolidated Edis.pdf
For Apple Inc AAPL Caterpillar CAT Consolidated Edis.pdf
 
For bacteria the primary issue with UV light exposure is th.pdf
For bacteria the primary issue with UV light exposure is th.pdfFor bacteria the primary issue with UV light exposure is th.pdf
For bacteria the primary issue with UV light exposure is th.pdf
 
For any of the questions below do not do math If there ar.pdf
For any of the questions below do not do math  If there ar.pdfFor any of the questions below do not do math  If there ar.pdf
For any of the questions below do not do math If there ar.pdf
 
For a test of H0p050 the z test statistic equals 251 U.pdf
For a test of H0p050 the z test statistic equals 251 U.pdfFor a test of H0p050 the z test statistic equals 251 U.pdf
For a test of H0p050 the z test statistic equals 251 U.pdf
 
For a review session in preparation for an animal diversity .pdf
For a review session in preparation for an animal diversity .pdfFor a review session in preparation for an animal diversity .pdf
For a review session in preparation for an animal diversity .pdf
 
For a random variable XVX was calculated to be 1 Is the.pdf
For a random variable XVX was calculated to be 1  Is the.pdfFor a random variable XVX was calculated to be 1  Is the.pdf
For a random variable XVX was calculated to be 1 Is the.pdf
 
For 37 years Janet saved 250 at the beginning of every mon.pdf
For 37 years Janet saved 250 at the beginning of every mon.pdfFor 37 years Janet saved 250 at the beginning of every mon.pdf
For 37 years Janet saved 250 at the beginning of every mon.pdf
 
For 21 years Janet saved 850 at the beginning of every mon.pdf
For 21 years Janet saved 850 at the beginning of every mon.pdfFor 21 years Janet saved 850 at the beginning of every mon.pdf
For 21 years Janet saved 850 at the beginning of every mon.pdf
 
For 39 years Janet saved 450 at the beginning of every mon.pdf
For 39 years Janet saved 450 at the beginning of every mon.pdfFor 39 years Janet saved 450 at the beginning of every mon.pdf
For 39 years Janet saved 450 at the beginning of every mon.pdf
 
Following is the pea plant characteristics and the location .pdf
Following is the pea plant characteristics and the location .pdfFollowing is the pea plant characteristics and the location .pdf
Following is the pea plant characteristics and the location .pdf
 
For 20Y2 McDade Company reported a decline in not income A.pdf
For 20Y2 McDade Company reported a decline in not income A.pdfFor 20Y2 McDade Company reported a decline in not income A.pdf
For 20Y2 McDade Company reported a decline in not income A.pdf
 
For 27 years Janet saved 900 at the beginning of every mon.pdf
For 27 years Janet saved 900 at the beginning of every mon.pdfFor 27 years Janet saved 900 at the beginning of every mon.pdf
For 27 years Janet saved 900 at the beginning of every mon.pdf
 
For 14 years Janet saved 800 at the beginning of every mon.pdf
For 14 years Janet saved 800 at the beginning of every mon.pdfFor 14 years Janet saved 800 at the beginning of every mon.pdf
For 14 years Janet saved 800 at the beginning of every mon.pdf
 
For 100 births P exactly 57 girls 00301 and P57 or mor.pdf
For 100 births P exactly 57 girls 00301 and P57 or mor.pdfFor 100 births P exactly 57 girls 00301 and P57 or mor.pdf
For 100 births P exactly 57 girls 00301 and P57 or mor.pdf
 

Último

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 

Último (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 

Find the smallest value In this task you have been given co.pdf

  • 1. Find the smallest value. In this task you have been given code that asks the user to enter 3 whole numbers, and stores these in an array. Your task is to identify the smallest of the three values in the array. You should store the result in a variable called smallest, so that it can be printed out. Please note: You can (and should) solve this task without sorting the array or using the Arrays utility class. import java.util.Scanner ; public class Smallest { public static void main(String[] args) { Scanner input = new Scanner(System.in) ; int[] values = new int[3] ; System.out.println("Please enter three whole numbers (one per line)"); values[0] = input.nextInt(); values[1] = input.nextInt(); values[2] = input.nextInt(); //Your code here System.out.println("The smallest value is " + smallest) ; } }