programing

programing

View Answers

April 16, 2009 at 10:13 AM

Hi friend,


Code to help in solving the problem :

import java.io.*;
class NumberExample
{
public static void main(String[] args) throws Exception
{

String string = "";
InputStreamReader input = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(input);
// read in user input



int ar[] = new int[4];
int count=1;

for(int i=0;i<ar.length;i++)
{
System.out.println("Enter "+count+" number");
ar[i]=Integer.parseInt(reader.readLine());

count++;
}

int min=ar[0];
int max=ar[0];

for(int i=1;i<ar.length;i++)
{
if(ar[i]<min)
{
min = ar[i];
}
if(ar[i]>max)
{
max = ar[i];
}

}


System.out.println("Min " + min);
System.out.println("Max " + max);

}
}

For read more information,Examples and Tutorials on Java visit to :

http://www.roseindia.net/java/

Thanks









Related Tutorials/Questions & Answers:
Java programing
Java programing   need help wrting this Write a program that has an array of 5 Strings, and determines which ones are palindromes (letter-case does not matter). thanks
socket programing in servlet
socket programing in servlet  give me a example to write socket programing in servlet
Advertisements
programing question
programing question  how do i use loops(for,while) to add components in java   Hi Friend, The below code might help you.ADS_TO_REPLACE_1 import java.awt.*; import javax.swing.*; class TextFieldArray extends JFrame
programing
programing
programing
programing
programing
programing
programing
programing
programing
programing
Programing Help - Java Beginners
Programing Help  how to design a filebrowser in java "witout using Swing
SOCKET PROGRAMING IN THE JAVA FOR NETWORKING CONCEPT
SOCKET PROGRAMING IN THE JAVA FOR NETWORKING CONCEPT  I WANT TO KNOW ABOUT THE JAVA SOCKET PROGRAMING FROM BASIC LEVEL AND HOW CAN I WORK ON IT I KNOW THE JAVA PROGRAMING.SO PLEASE HELP ME HOW CAN I DO SOCKET PROGRAMING
cnc programing course
cnc programing course  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: cnc programing... the topic "cnc programing course". Also tell me which is the good
Java programing help
Java programing help  Can you help me create this program? Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed). As they enter the data, assign
javascript programing error - JSP-Servlet
javascript programing error  hi deepak i m using explorer to run javascript program in this there is no option to check error will u plz tell me the way to check error in explorer as we can check with mozila
java programing problem - Java Beginners
java programing problem  Create a class named Movie that can be used with your video rental business. The Movie class should track the Motion picture Association of America rating , ID Number, and movie title with appropriate
cnc programing classes near me
cnc programing classes near me  Hi, I am beginner in Data Science... programing classes near me Try to provide me good examples or tutorials links so that I can learn the topic "cnc programing classes near me". Also tell
guys,, need help,, in java programing,, arrays
guys,, need help,, in java programing,, arrays  create a program where you will input 10 numbers and arrange it in ascending way using arrays
java programing
programing - IoC
programing - WebSevices
java programing
Javascirpt Programing
C++ programing
c programing
c programing
java programing
java programing
Java Programing
socket programing
java programing - Java Beginners
Java Programing - Java Beginners
java programing - Java Beginners
java programing - JDBC
programing - Development process
C Programing - CVS
java programing - Java Beginners
java programing - Java Beginners
Java programing - Development process
java IO programing
help with substring in c programing
beginning java programing
Using Taglib in JSP. A brief introduction to taglibs and taglibs programing.
Threading in Java
Threading in Java         Overview of Thread Threading concept is very important in Java Programing language. A thread is a sequential path
Threading in Java
Using Taglib in JSP. A brief introduction to taglibs and taglibs programing.
SCJP Module-6 Question-2

Ads