Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0%
(1)
0% found this document useful (1 vote)
2K views
Lab 3.20 (JAVA)
3.20 LAB: Smallest number Write a program whose inputs are three integers, and whose output is the smallest of the three values.
Uploaded by
Theodore Milonski
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download now
Download
Save Lab 3.20 (JAVA) For Later
Download
Save
Save Lab 3.20 (JAVA) For Later
0%
0% found this document useful, undefined
100%
, undefined
Embed
Share
Print
Report
0%
(1)
0% found this document useful (1 vote)
2K views
Lab 3.20 (JAVA)
3.20 LAB: Smallest number Write a program whose inputs are three integers, and whose output is the smallest of the three values.
Uploaded by
Theodore Milonski
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download now
Download
Save Lab 3.20 (JAVA) For Later
Carousel Previous
Carousel Next
Save
Save Lab 3.20 (JAVA) For Later
0%
0% found this document useful, undefined
100%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 1
Search
Fullscreen
3.
20 LAB: Smallest number
Write a program whose inputs are three integers, and whose output is the smallest
of the three values.
Ex: If the input is: 7 15 3
the output is: 3
CODE (JAVA):
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
int num1;
int num2;
int num3;
Scanner scnr = new Scanner(System.in);
num1 = scnr.nextInt();
num2 = scnr.nextInt();
num3 = scnr.nextInt();
int smallest = Math.min(num1, Math.min(num2, num3));
System.out.println(smallest);
}
}
You might also like
Lab 3.21 (JAVA)
PDF
50% (2)
Lab 3.21 (JAVA)
2 pages
3.13 LAB: Input and Formatted Output: House Real Estate Summary
PDF
100% (1)
3.13 LAB: Input and Formatted Output: House Real Estate Summary
1 page
3.26 LAB Seasons
PDF
75% (4)
3.26 LAB Seasons
2 pages
5.19 LAB Driving Costs - Functions
PDF
100% (2)
5.19 LAB Driving Costs - Functions
2 pages
4.14 LAB Count Input Length Without Spaces, Periods, or Commas
PDF
43% (7)
4.14 LAB Count Input Length Without Spaces, Periods, or Commas
1 page
2.31 LAB Expression For Calories Burned During Workout
PDF
No ratings yet
2.31 LAB Expression For Calories Burned During Workout
2 pages
Lab 3.19 (JAVA)
PDF
100% (2)
Lab 3.19 (JAVA)
2 pages
3.28 LAB Leap Year
PDF
100% (1)
3.28 LAB Leap Year
2 pages
6.27 LAB Word Frequencies
PDF
43% (7)
6.27 LAB Word Frequencies
1 page
6.6 LAB Name Format
PDF
100% (2)
6.6 LAB Name Format
1 page
5.21 LAB Leap Year - Functions
PDF
50% (2)
5.21 LAB Leap Year - Functions
2 pages
2.12 Zylab Training Basics
PDF
0% (4)
2.12 Zylab Training Basics
2 pages
3.14 LAB Simple Statistics
PDF
100% (1)
3.14 LAB Simple Statistics
1 page
4.16 LAB Output Range With Increment of 10
PDF
No ratings yet
4.16 LAB Output Range With Increment of 10
1 page
4.17 LAB Print String in Reverse
PDF
0% (1)
4.17 LAB Print String in Reverse
1 page
2.17 LAB Input Mad Lib
PDF
100% (1)
2.17 LAB Input Mad Lib
1 page
4.18 LAB Smallest and Largest Numbers in A List
PDF
0% (5)
4.18 LAB Smallest and Largest Numbers in A List
2 pages
3.27 LAB Exact Change
PDF
50% (4)
3.27 LAB Exact Change
4 pages
6.26 LAB Elements in A Range
PDF
0% (16)
6.26 LAB Elements in A Range
1 page
2.29 LAB Divide by X
PDF
100% (1)
2.29 LAB Divide by X
2 pages
2.15 LAB Formatted Output No Parking Sign
PDF
No ratings yet
2.15 LAB Formatted Output No Parking Sign
1 page
6.7 LAB Palindrome
PDF
50% (2)
6.7 LAB Palindrome
1 page
4.19 LAB Output Values in A List Below A User Defined Amount
PDF
67% (3)
4.19 LAB Output Values in A List Below A User Defined Amount
2 pages
6.28 LAB Replacement Words
PDF
50% (4)
6.28 LAB Replacement Words
1 page
5.23 LAB Exact Change Functionswrite A Program With Total Chang
PDF
No ratings yet
5.23 LAB Exact Change Functionswrite A Program With Total Chang
4 pages
Lab 4.15 (JAVA)
PDF
50% (2)
Lab 4.15 (JAVA)
2 pages
2.31 LAB Expression For Calories Burned During Workout
PDF
No ratings yet
2.31 LAB Expression For Calories Burned During Workout
2 pages
3.25 LAB Smallest Number
PDF
100% (1)
3.25 LAB Smallest Number
1 page
5.20 LAB Step Counter
PDF
100% (1)
5.20 LAB Step Counter
1 page
CYB 130 Week 4 Python LAB 5.24 Even Odd Values in A List
PDF
No ratings yet
CYB 130 Week 4 Python LAB 5.24 Even Odd Values in A List
3 pages
This Study Resource Was: 11.1 User-Defined Functions: Miles To Track Laps
PDF
No ratings yet
This Study Resource Was: 11.1 User-Defined Functions: Miles To Track Laps
9 pages
Lab 4.13 (JAVA)
PDF
0% (1)
Lab 4.13 (JAVA)
1 page
6.24 LAB Varied Amount of Input Data
PDF
100% (1)
6.24 LAB Varied Amount of Input Data
1 page
CYB 130 Week 1 Python LAB 2.29 Divide by X
PDF
No ratings yet
CYB 130 Week 1 Python LAB 2.29 Divide by X
1 page
5.22 LAB Swapping Variables
PDF
100% (1)
5.22 LAB Swapping Variables
1 page
Lab 3.18 (JAVA)
PDF
No ratings yet
Lab 3.18 (JAVA)
1 page
CYB 130 Week 4 Python LAB 5.21 Leap Year - Functions
PDF
No ratings yet
CYB 130 Week 4 Python LAB 5.21 Leap Year - Functions
3 pages
6.5 LAB Checker For Integer String
PDF
0% (1)
6.5 LAB Checker For Integer String
1 page
6.25 LAB Filter and Sort A List
PDF
50% (4)
6.25 LAB Filter and Sort A List
1 page
5.18 LAB Miles To Track Laps
PDF
0% (1)
5.18 LAB Miles To Track Laps
1 page
CYB 130 Week 4 Python LAB 5.20 Step Counter
PDF
No ratings yet
CYB 130 Week 4 Python LAB 5.20 Step Counter
2 pages
CYB-130 8.26 LAB: Exact Change - Functions
PDF
0% (1)
CYB-130 8.26 LAB: Exact Change - Functions
2 pages
Java Program To Check Leap Year
PDF
No ratings yet
Java Program To Check Leap Year
12 pages
Download ebooks file Programming PHP 4th Edition Peter Macintyre all chapters
PDF
100% (2)
Download ebooks file Programming PHP 4th Edition Peter Macintyre all chapters
55 pages
Desk Check Example - Modules
PDF
No ratings yet
Desk Check Example - Modules
2 pages
C Programs To Become Expert In Programming
From Everand
C Programs To Become Expert In Programming
Shubham Yadav
No ratings yet
c programming code
PDF
No ratings yet
c programming code
8 pages
Question 1:. Save Your Work and Use The Filename (Act1Whileloop - Lastname)
PDF
No ratings yet
Question 1:. Save Your Work and Use The Filename (Act1Whileloop - Lastname)
1 page
Computer Programming Solved C++
PDF
No ratings yet
Computer Programming Solved C++
3 pages
Python
PDF
No ratings yet
Python
1 page
Game imagine outputs pst
PDF
No ratings yet
Game imagine outputs pst
21 pages
Object-Oriented Programming Lab Problems
PDF
No ratings yet
Object-Oriented Programming Lab Problems
6 pages
Frmwebshowdoc Rep 128094
PDF
No ratings yet
Frmwebshowdoc Rep 128094
2 pages
Python for Data Science: Data Science Mastery by Nikhil Khan, #1
From Everand
Python for Data Science: Data Science Mastery by Nikhil Khan, #1
Nikhil Khan
No ratings yet
Gd Script
From Everand
Gd Script
Marijo Trkulja
No ratings yet
Core Java Programming Book
From Everand
Core Java Programming Book
Manish Soni
No ratings yet
Intermediate Programming
PDF
No ratings yet
Intermediate Programming
8 pages
Profound Python Data Science
From Everand
Profound Python Data Science
Onder Teker
No ratings yet
Array Homework
PDF
No ratings yet
Array Homework
1 page
Introduction to Algorithms
From Everand
Introduction to Algorithms
S VASIST
No ratings yet
Documents
Technology & Engineering