import java.io.*;
import java.io.IOException;
//javac create_array.java
public class create_array
{
String str = "Helloworld";
public static void main(String[] args) throws IOException

{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
// needs throws IOException
System.out.print("Type some thing : ");
String str =br.readLine();
String[] words = str.split (" ");
int n1 = words.length;
System.out.println ("No of words are : " +n1);
System.out.println("--for loop: ");
//declaring a data type array and intialized at the same time
//it would have been done like 23, 3.5 , and so on, in the place of n1
//test str as 1.2 2.4 3.4 4.4 5.4
double[] d1 = new double[n1] ;
for (int i =0; i <= n1-1; i++)
{
System.out.print ("\t endtered " + words[i]);
d1[i] = Double.parseDouble(words[i]);
System.out.println ("\tround " + i + " value: " + d1[i] + " "+ "* 2 =" + d1[i]* 2 );
}//end for loop
System.out.println("--do while loop: ");
int x = 0;
do {
System.out.println ("\tround " + x + " value: " + words[x]);
x++;

}while(x <= (n1-1));
}
}