Rashmi
Answered On : Jan 22nd, 2012
Code
import java.io.*;
import java.util.*;
public class ((class name here)) {
public static void main
(String[] args
) {
Scanner q
=new Scanner
(System.
in);
System.
out.
println("Input three numbers");
int i[] = new int[3];
i[0]=q.nextInt();
i[1]=q.nextInt();
i[2]=q.nextInt();
System.
out.
println(i
[0]+","+i
[1]+","+i
[2
}
}
Login to rate this answer.
NARESH KUMAR
Answered On : Feb 3rd, 2012
Code syntax is:-
Code
import java.util.Scanner;
public class A{
public static void main
(String[] args
){
Scanner scanner
=new Scanner
(System.
in);
int v1=s.nextInt();//value 1st
int v2=s.nextint();//value 2nd
int v3=s.nextInt();//value 3rd
}//end of main method
}// end of class
Login to rate this answer.
vishnu
Answered On : Feb 24th, 2012
import java.util.Iterator;
import java.util.Scanner;
import java.util.SortedSet;
import java.util.TreeSet;
public class ascend {
static int i=0;
public static void main(String[] args)
{
SortedSet elements = new TreeSet();
for(int j=0;j<3;j++)
{
Scanner sc=new Scanner(System.in);
i=sc.nextInt();
elements.add(i);
}
Iterator iter = elements.iterator();
while (iter.hasNext()) {
System.out.println("Element in set is --> "+iter.next());
}}}
Login to rate this answer.