help i want it now the answer pleas...
write a program that will display the exactly output as below:
Hints: declare and initialize value of array in double type.Read and write all elements of array.perform the multiply operation for each element.)
Output:
List of numbers: 1.9 3.7 5.4 7.7 9.23 11.15 23.4
After multiplication:
The numbers are: 3.8 7.4 10.8 15.4 18.46 22.30 46.8
View Answers
June 22, 2011 at 10:39 AM
import java.util.*;
class ArrayExample
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("Enter Array Elements: ");
double array[]=new double[10];
for(int i=0;i<array.length;i++){
array[i]=input.nextDouble();
}
System.out.println("After multiplication, array changes to: ");
for(int i=0;i<array.length;i++){
array[i]=array[i]*2;
System.out.println(array[i]);
}
}
}
Ads
Related Tutorials/Questions & Answers:
help i want it now the answer pleas...
help i want it
now the
answer pleas... write a program that will display the exactly output as below:
Hints: declare and initialize value of array in double type.Read and write all elements of array.perform the multiply
Advertisements
help pleas? -_-
help pleas? -_- Write a Java program that reads from the user an integer N followed by N integers. The program then prints the product of odd integers, and, the sum of even integers
Please Help Now
Please
Help Now
i want to put this map in ajax oriented codeigniter website
thanks in advance
plz
help me
now plz
very urgent
want help regarding a project
want help regarding a project hiii this is hemangi and
I want guidance that
I am working on a project of hospital management system so
I want guidance that how can
i implement that in swings or with other frame work? and any
i want to update values
i want to update values in my form
i have 2 submit buttons one... database and it need to insert automatically in to disabled text boxs and once
i press the edit button all text boxs need to enable so that
i can edit my details
i want to learn Jquery
i want to learn Jquery
i want to learn jquery can u plz guide me
Yes, you can learn these technologies by yourself. Go through the following links:
Ajax Tutorials
JSON Tutorials
JQuery Tutorials
i cNT GET ANSWER FOR THIS QUESTION
i cNT GET
ANSWER FOR THIS QUESTION The roots of the quadratic equation ax2+bx+c=0, aïâ??¹0 are given by the following formula:
x=(-bÃ?±âË?Å¡(b^2-4ac))/2a
In this formula. The term b2-4ac is called
I want this jsp answers
I want this jsp answers
How can we declare third party classes and interfaces inside our jsp page?
How can we declare and definr global variables... for particular jsp pages?
If we
want to develop any jsp pages using eclipse where we can
I want this jsp answers
I want this jsp answers
How can we declare third party classes and interfaces inside our jsp page?
How can we declare and definr global variables... for particular jsp pages?
If we
want to develop any jsp pages using eclipse where we can