SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
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) ;
}
}

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Plus 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
 

Plus 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
 

Dernier

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 

Dernier (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

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) ; } }