SlideShare a Scribd company logo
MinOfFourNumbers.java
import java.util.Scanner;
public class MinOfFourNumbers {
public static void main(String[] args) {
//Creating an Integer array of size 4
int numbers[]=new int[4];
//declaring the variables
int min;
//Scanner object is used to get the values entered by the user.
Scanner sc=new Scanner(System.in);
/* This for loop will get the values from the user
* and populate into the array
*/
for(int i=0;i<4;i++)
{
//Getting the number from the user.
System.out.print("Enter Number "+(i+1)+" :");
numbers[i]=sc.nextInt();
}
//Store the first element of the array in min variable
min=numbers[0];
//This loop will calculate the minimum of 4 numbers
for(int i=0;i<4;i++)
{
/*Check each element of the array with the value value contained in the min variable.
* If the element of the array is less than min,then assign that element to min variable
*/
if(numbers[i]
Solution
MinOfFourNumbers.java
import java.util.Scanner;
public class MinOfFourNumbers {
public static void main(String[] args) {
//Creating an Integer array of size 4
int numbers[]=new int[4];
//declaring the variables
int min;
//Scanner object is used to get the values entered by the user.
Scanner sc=new Scanner(System.in);
/* This for loop will get the values from the user
* and populate into the array
*/
for(int i=0;i<4;i++)
{
//Getting the number from the user.
System.out.print("Enter Number "+(i+1)+" :");
numbers[i]=sc.nextInt();
}
//Store the first element of the array in min variable
min=numbers[0];
//This loop will calculate the minimum of 4 numbers
for(int i=0;i<4;i++)
{
/*Check each element of the array with the value value contained in the min variable.
* If the element of the array is less than min,then assign that element to min variable
*/
if(numbers[i]

More Related Content

Similar to MinOfFourNumbers.javaimport java.util.Scanner;public class MinOf.pdf

Sorting and Searching in Array.pptx
Sorting and Searching in Array.pptxSorting and Searching in Array.pptx
Sorting and Searching in Array.pptx
MERIAMMADERA2
 
import java.util.Scanner;public class ArrayData {      AR.pdf
import java.util.Scanner;public class ArrayData {        AR.pdfimport java.util.Scanner;public class ArrayData {        AR.pdf
import java.util.Scanner;public class ArrayData {      AR.pdf
info382133
 
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdfGetting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
info309708
 
OrderTest.javapublic class OrderTest {       Get an arra.pdf
OrderTest.javapublic class OrderTest {         Get an arra.pdfOrderTest.javapublic class OrderTest {         Get an arra.pdf
OrderTest.javapublic class OrderTest {       Get an arra.pdf
akkhan101
 
The java program Jumble that prompts user to enter nu.pdf
   The java program Jumble that prompts user to  enter nu.pdf   The java program Jumble that prompts user to  enter nu.pdf
The java program Jumble that prompts user to enter nu.pdf
annapurnnatextailes
 
when I compile to get the survey title the overload constructor asks.docx
when I compile to get the survey title the overload constructor asks.docxwhen I compile to get the survey title the overload constructor asks.docx
when I compile to get the survey title the overload constructor asks.docx
lashandaotley
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
Aiman Hud
 
6_Array.pptx
6_Array.pptx6_Array.pptx
6_Array.pptx
shafat6712
 
Implementation of Banker’s Algorithm using java is given below .pdf
Implementation of Banker’s Algorithm using java is given below .pdfImplementation of Banker’s Algorithm using java is given below .pdf
Implementation of Banker’s Algorithm using java is given below .pdf
aryan9007
 
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfC++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
yamew16788
 
Write a method called uniqueNumbers that takes an int array as param.pdf
Write a method called uniqueNumbers that takes an int array as param.pdfWrite a method called uniqueNumbers that takes an int array as param.pdf
Write a method called uniqueNumbers that takes an int array as param.pdf
fashioncollection2
 
Lab02kdfshdfgajhdfgajhdfgajhdfgjhadgfasjhdgfjhasdgfjh.pdf
Lab02kdfshdfgajhdfgajhdfgajhdfgjhadgfasjhdgfjhasdgfjh.pdfLab02kdfshdfgajhdfgajhdfgajhdfgjhadgfasjhdgfjhasdgfjh.pdf
Lab02kdfshdfgajhdfgajhdfgajhdfgjhadgfasjhdgfjhasdgfjh.pdf
QalandarBux2
 
Write a function which return a list of all of the n element subset .pdf
Write a function which return a list of all of the n element subset .pdfWrite a function which return a list of all of the n element subset .pdf
Write a function which return a list of all of the n element subset .pdf
hardjasonoco14599
 
Dr. Rajeshree Khande - Java Interactive input
Dr. Rajeshree Khande - Java Interactive inputDr. Rajeshree Khande - Java Interactive input
Dr. Rajeshree Khande - Java Interactive input
jalinder123
 
Dr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive inputDr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive input
DrRajeshreeKhande
 
using recursive method .pdf
  using recursive method .pdf  using recursive method .pdf
using recursive method .pdf
vichu19891
 
Hw3
Hw3Hw3
What will be the output from the following code if the user enters 4.pdf
What will be the output from the following code if the user enters 4.pdfWhat will be the output from the following code if the user enters 4.pdf
What will be the output from the following code if the user enters 4.pdf
anavmuthu
 
Complete the classes shown below 1. The MinHeap Class Write necessa.pdf
Complete the classes shown below 1. The MinHeap Class Write necessa.pdfComplete the classes shown below 1. The MinHeap Class Write necessa.pdf
Complete the classes shown below 1. The MinHeap Class Write necessa.pdf
americanopticalscbe
 

Similar to MinOfFourNumbers.javaimport java.util.Scanner;public class MinOf.pdf (20)

Sorting and Searching in Array.pptx
Sorting and Searching in Array.pptxSorting and Searching in Array.pptx
Sorting and Searching in Array.pptx
 
import java.util.Scanner;public class ArrayData {      AR.pdf
import java.util.Scanner;public class ArrayData {        AR.pdfimport java.util.Scanner;public class ArrayData {        AR.pdf
import java.util.Scanner;public class ArrayData {      AR.pdf
 
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdfGetting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
 
OrderTest.javapublic class OrderTest {       Get an arra.pdf
OrderTest.javapublic class OrderTest {         Get an arra.pdfOrderTest.javapublic class OrderTest {         Get an arra.pdf
OrderTest.javapublic class OrderTest {       Get an arra.pdf
 
The java program Jumble that prompts user to enter nu.pdf
   The java program Jumble that prompts user to  enter nu.pdf   The java program Jumble that prompts user to  enter nu.pdf
The java program Jumble that prompts user to enter nu.pdf
 
when I compile to get the survey title the overload constructor asks.docx
when I compile to get the survey title the overload constructor asks.docxwhen I compile to get the survey title the overload constructor asks.docx
when I compile to get the survey title the overload constructor asks.docx
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
 
6_Array.pptx
6_Array.pptx6_Array.pptx
6_Array.pptx
 
Implementation of Banker’s Algorithm using java is given below .pdf
Implementation of Banker’s Algorithm using java is given below .pdfImplementation of Banker’s Algorithm using java is given below .pdf
Implementation of Banker’s Algorithm using java is given below .pdf
 
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfC++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
 
Write a method called uniqueNumbers that takes an int array as param.pdf
Write a method called uniqueNumbers that takes an int array as param.pdfWrite a method called uniqueNumbers that takes an int array as param.pdf
Write a method called uniqueNumbers that takes an int array as param.pdf
 
Lab02kdfshdfgajhdfgajhdfgajhdfgjhadgfasjhdgfjhasdgfjh.pdf
Lab02kdfshdfgajhdfgajhdfgajhdfgjhadgfasjhdgfjhasdgfjh.pdfLab02kdfshdfgajhdfgajhdfgajhdfgjhadgfasjhdgfjhasdgfjh.pdf
Lab02kdfshdfgajhdfgajhdfgajhdfgjhadgfasjhdgfjhasdgfjh.pdf
 
Write a function which return a list of all of the n element subset .pdf
Write a function which return a list of all of the n element subset .pdfWrite a function which return a list of all of the n element subset .pdf
Write a function which return a list of all of the n element subset .pdf
 
Java programs
Java programsJava programs
Java programs
 
Dr. Rajeshree Khande - Java Interactive input
Dr. Rajeshree Khande - Java Interactive inputDr. Rajeshree Khande - Java Interactive input
Dr. Rajeshree Khande - Java Interactive input
 
Dr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive inputDr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive input
 
using recursive method .pdf
  using recursive method .pdf  using recursive method .pdf
using recursive method .pdf
 
Hw3
Hw3Hw3
Hw3
 
What will be the output from the following code if the user enters 4.pdf
What will be the output from the following code if the user enters 4.pdfWhat will be the output from the following code if the user enters 4.pdf
What will be the output from the following code if the user enters 4.pdf
 
Complete the classes shown below 1. The MinHeap Class Write necessa.pdf
Complete the classes shown below 1. The MinHeap Class Write necessa.pdfComplete the classes shown below 1. The MinHeap Class Write necessa.pdf
Complete the classes shown below 1. The MinHeap Class Write necessa.pdf
 

More from aptex1

Name- Gold leaved white PoplarGenus- Populusspecies- albaAutho.pdf
Name- Gold leaved white PoplarGenus- Populusspecies- albaAutho.pdfName- Gold leaved white PoplarGenus- Populusspecies- albaAutho.pdf
Name- Gold leaved white PoplarGenus- Populusspecies- albaAutho.pdf
aptex1
 
molarity = 0.252101.1 =0.001236 M percent =0.251002 =12.5 .pdf
molarity = 0.252101.1 =0.001236 M percent =0.251002 =12.5 .pdfmolarity = 0.252101.1 =0.001236 M percent =0.251002 =12.5 .pdf
molarity = 0.252101.1 =0.001236 M percent =0.251002 =12.5 .pdf
aptex1
 
Initial concentration of Br- = 2.25 x 10e-3M1V1=M2V2therefore M2.pdf
Initial concentration of Br- = 2.25 x 10e-3M1V1=M2V2therefore M2.pdfInitial concentration of Br- = 2.25 x 10e-3M1V1=M2V2therefore M2.pdf
Initial concentration of Br- = 2.25 x 10e-3M1V1=M2V2therefore M2.pdf
aptex1
 
import java.util.Scanner;public class HornersPolynomial {   .pdf
import java.util.Scanner;public class HornersPolynomial {   .pdfimport java.util.Scanner;public class HornersPolynomial {   .pdf
import java.util.Scanner;public class HornersPolynomial {   .pdf
aptex1
 
Direct memory access (DMA) is a function that allows an inputoutput.pdf
Direct memory access (DMA) is a function that allows an inputoutput.pdfDirect memory access (DMA) is a function that allows an inputoutput.pdf
Direct memory access (DMA) is a function that allows an inputoutput.pdf
aptex1
 
Ethanol is miscible in water because of the hydroxyl functional grou.pdf
Ethanol is miscible in water because of the hydroxyl functional grou.pdfEthanol is miscible in water because of the hydroxyl functional grou.pdf
Ethanol is miscible in water because of the hydroxyl functional grou.pdf
aptex1
 
the diluted concentration of HCl = (0.120 M x 25..pdf
                     the diluted concentration of HCl = (0.120 M x 25..pdf                     the diluted concentration of HCl = (0.120 M x 25..pdf
the diluted concentration of HCl = (0.120 M x 25..pdf
aptex1
 
Simple Nobody Knows The Answer .pdf
                     Simple Nobody Knows The Answer                   .pdf                     Simple Nobody Knows The Answer                   .pdf
Simple Nobody Knows The Answer .pdf
aptex1
 
AnswerThe net equation of the reaction catalyzed by the protein c.pdf
AnswerThe net equation of the reaction catalyzed by the protein c.pdfAnswerThe net equation of the reaction catalyzed by the protein c.pdf
AnswerThe net equation of the reaction catalyzed by the protein c.pdf
aptex1
 
Answer i command.The vi editor always starts in command mode. For.pdf
Answer i command.The vi editor always starts in command mode. For.pdfAnswer i command.The vi editor always starts in command mode. For.pdf
Answer i command.The vi editor always starts in command mode. For.pdf
aptex1
 
Answer (b) systems security and control.The businesses are now a .pdf
Answer (b) systems security and control.The businesses are now a .pdfAnswer (b) systems security and control.The businesses are now a .pdf
Answer (b) systems security and control.The businesses are now a .pdf
aptex1
 
A. Temeperature of refrigeratorsIntervalB. Horspower of .pdf
A. Temeperature of refrigeratorsIntervalB. Horspower of .pdfA. Temeperature of refrigeratorsIntervalB. Horspower of .pdf
A. Temeperature of refrigeratorsIntervalB. Horspower of .pdf
aptex1
 
48. The answer is Botulism. Botulism ia an illness that brings about.pdf
48. The answer is Botulism. Botulism ia an illness that brings about.pdf48. The answer is Botulism. Botulism ia an illness that brings about.pdf
48. The answer is Botulism. Botulism ia an illness that brings about.pdf
aptex1
 
2) b) Understory is rich in humidity hence supports fungi3) a) can.pdf
2) b) Understory is rich in humidity hence supports fungi3) a) can.pdf2) b) Understory is rich in humidity hence supports fungi3) a) can.pdf
2) b) Understory is rich in humidity hence supports fungi3) a) can.pdf
aptex1
 
1.Discuss in detail Emile Durkheim and his contributions to the fiel.pdf
1.Discuss in detail Emile Durkheim and his contributions to the fiel.pdf1.Discuss in detail Emile Durkheim and his contributions to the fiel.pdf
1.Discuss in detail Emile Durkheim and his contributions to the fiel.pdf
aptex1
 
1) YELLOW FEVERGroup Group IV ((+) ssRNA)Order   Unassigned.pdf
1) YELLOW FEVERGroup Group IV ((+) ssRNA)Order   Unassigned.pdf1) YELLOW FEVERGroup Group IV ((+) ssRNA)Order   Unassigned.pdf
1) YELLOW FEVERGroup Group IV ((+) ssRNA)Order   Unassigned.pdf
aptex1
 
Thermodynamic entropy is a non-conserved state fu.pdf
                     Thermodynamic entropy is a non-conserved state fu.pdf                     Thermodynamic entropy is a non-conserved state fu.pdf
Thermodynamic entropy is a non-conserved state fu.pdf
aptex1
 
I is oxidized by 6 electrons as the oxidation sta.pdf
                     I is oxidized by 6 electrons as the oxidation sta.pdf                     I is oxidized by 6 electrons as the oxidation sta.pdf
I is oxidized by 6 electrons as the oxidation sta.pdf
aptex1
 
The main difference is that Democritus was not a .pdf
                     The main difference is that Democritus was not a .pdf                     The main difference is that Democritus was not a .pdf
The main difference is that Democritus was not a .pdf
aptex1
 
for acidic nature is should give H+ equation H.pdf
                     for acidic nature is should give H+  equation  H.pdf                     for acidic nature is should give H+  equation  H.pdf
for acidic nature is should give H+ equation H.pdf
aptex1
 

More from aptex1 (20)

Name- Gold leaved white PoplarGenus- Populusspecies- albaAutho.pdf
Name- Gold leaved white PoplarGenus- Populusspecies- albaAutho.pdfName- Gold leaved white PoplarGenus- Populusspecies- albaAutho.pdf
Name- Gold leaved white PoplarGenus- Populusspecies- albaAutho.pdf
 
molarity = 0.252101.1 =0.001236 M percent =0.251002 =12.5 .pdf
molarity = 0.252101.1 =0.001236 M percent =0.251002 =12.5 .pdfmolarity = 0.252101.1 =0.001236 M percent =0.251002 =12.5 .pdf
molarity = 0.252101.1 =0.001236 M percent =0.251002 =12.5 .pdf
 
Initial concentration of Br- = 2.25 x 10e-3M1V1=M2V2therefore M2.pdf
Initial concentration of Br- = 2.25 x 10e-3M1V1=M2V2therefore M2.pdfInitial concentration of Br- = 2.25 x 10e-3M1V1=M2V2therefore M2.pdf
Initial concentration of Br- = 2.25 x 10e-3M1V1=M2V2therefore M2.pdf
 
import java.util.Scanner;public class HornersPolynomial {   .pdf
import java.util.Scanner;public class HornersPolynomial {   .pdfimport java.util.Scanner;public class HornersPolynomial {   .pdf
import java.util.Scanner;public class HornersPolynomial {   .pdf
 
Direct memory access (DMA) is a function that allows an inputoutput.pdf
Direct memory access (DMA) is a function that allows an inputoutput.pdfDirect memory access (DMA) is a function that allows an inputoutput.pdf
Direct memory access (DMA) is a function that allows an inputoutput.pdf
 
Ethanol is miscible in water because of the hydroxyl functional grou.pdf
Ethanol is miscible in water because of the hydroxyl functional grou.pdfEthanol is miscible in water because of the hydroxyl functional grou.pdf
Ethanol is miscible in water because of the hydroxyl functional grou.pdf
 
the diluted concentration of HCl = (0.120 M x 25..pdf
                     the diluted concentration of HCl = (0.120 M x 25..pdf                     the diluted concentration of HCl = (0.120 M x 25..pdf
the diluted concentration of HCl = (0.120 M x 25..pdf
 
Simple Nobody Knows The Answer .pdf
                     Simple Nobody Knows The Answer                   .pdf                     Simple Nobody Knows The Answer                   .pdf
Simple Nobody Knows The Answer .pdf
 
AnswerThe net equation of the reaction catalyzed by the protein c.pdf
AnswerThe net equation of the reaction catalyzed by the protein c.pdfAnswerThe net equation of the reaction catalyzed by the protein c.pdf
AnswerThe net equation of the reaction catalyzed by the protein c.pdf
 
Answer i command.The vi editor always starts in command mode. For.pdf
Answer i command.The vi editor always starts in command mode. For.pdfAnswer i command.The vi editor always starts in command mode. For.pdf
Answer i command.The vi editor always starts in command mode. For.pdf
 
Answer (b) systems security and control.The businesses are now a .pdf
Answer (b) systems security and control.The businesses are now a .pdfAnswer (b) systems security and control.The businesses are now a .pdf
Answer (b) systems security and control.The businesses are now a .pdf
 
A. Temeperature of refrigeratorsIntervalB. Horspower of .pdf
A. Temeperature of refrigeratorsIntervalB. Horspower of .pdfA. Temeperature of refrigeratorsIntervalB. Horspower of .pdf
A. Temeperature of refrigeratorsIntervalB. Horspower of .pdf
 
48. The answer is Botulism. Botulism ia an illness that brings about.pdf
48. The answer is Botulism. Botulism ia an illness that brings about.pdf48. The answer is Botulism. Botulism ia an illness that brings about.pdf
48. The answer is Botulism. Botulism ia an illness that brings about.pdf
 
2) b) Understory is rich in humidity hence supports fungi3) a) can.pdf
2) b) Understory is rich in humidity hence supports fungi3) a) can.pdf2) b) Understory is rich in humidity hence supports fungi3) a) can.pdf
2) b) Understory is rich in humidity hence supports fungi3) a) can.pdf
 
1.Discuss in detail Emile Durkheim and his contributions to the fiel.pdf
1.Discuss in detail Emile Durkheim and his contributions to the fiel.pdf1.Discuss in detail Emile Durkheim and his contributions to the fiel.pdf
1.Discuss in detail Emile Durkheim and his contributions to the fiel.pdf
 
1) YELLOW FEVERGroup Group IV ((+) ssRNA)Order   Unassigned.pdf
1) YELLOW FEVERGroup Group IV ((+) ssRNA)Order   Unassigned.pdf1) YELLOW FEVERGroup Group IV ((+) ssRNA)Order   Unassigned.pdf
1) YELLOW FEVERGroup Group IV ((+) ssRNA)Order   Unassigned.pdf
 
Thermodynamic entropy is a non-conserved state fu.pdf
                     Thermodynamic entropy is a non-conserved state fu.pdf                     Thermodynamic entropy is a non-conserved state fu.pdf
Thermodynamic entropy is a non-conserved state fu.pdf
 
I is oxidized by 6 electrons as the oxidation sta.pdf
                     I is oxidized by 6 electrons as the oxidation sta.pdf                     I is oxidized by 6 electrons as the oxidation sta.pdf
I is oxidized by 6 electrons as the oxidation sta.pdf
 
The main difference is that Democritus was not a .pdf
                     The main difference is that Democritus was not a .pdf                     The main difference is that Democritus was not a .pdf
The main difference is that Democritus was not a .pdf
 
for acidic nature is should give H+ equation H.pdf
                     for acidic nature is should give H+  equation  H.pdf                     for acidic nature is should give H+  equation  H.pdf
for acidic nature is should give H+ equation H.pdf
 

Recently uploaded

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

MinOfFourNumbers.javaimport java.util.Scanner;public class MinOf.pdf

  • 1. MinOfFourNumbers.java import java.util.Scanner; public class MinOfFourNumbers { public static void main(String[] args) { //Creating an Integer array of size 4 int numbers[]=new int[4]; //declaring the variables int min; //Scanner object is used to get the values entered by the user. Scanner sc=new Scanner(System.in); /* This for loop will get the values from the user * and populate into the array */ for(int i=0;i<4;i++) { //Getting the number from the user. System.out.print("Enter Number "+(i+1)+" :"); numbers[i]=sc.nextInt(); } //Store the first element of the array in min variable min=numbers[0]; //This loop will calculate the minimum of 4 numbers for(int i=0;i<4;i++) { /*Check each element of the array with the value value contained in the min variable. * If the element of the array is less than min,then assign that element to min variable */ if(numbers[i] Solution
  • 2. MinOfFourNumbers.java import java.util.Scanner; public class MinOfFourNumbers { public static void main(String[] args) { //Creating an Integer array of size 4 int numbers[]=new int[4]; //declaring the variables int min; //Scanner object is used to get the values entered by the user. Scanner sc=new Scanner(System.in); /* This for loop will get the values from the user * and populate into the array */ for(int i=0;i<4;i++) { //Getting the number from the user. System.out.print("Enter Number "+(i+1)+" :"); numbers[i]=sc.nextInt(); } //Store the first element of the array in min variable min=numbers[0]; //This loop will calculate the minimum of 4 numbers for(int i=0;i<4;i++) { /*Check each element of the array with the value value contained in the min variable. * If the element of the array is less than min,then assign that element to min variable */ if(numbers[i]