Tuesday, 10 October 2017

java program product using array

java program product using array

public class proArray
{
    public static void main(String args[])
{
 int array[]={12,13,14,11,12,21};
  int pro=1;
 for(int i=0;i<=5;i++)
{
       pro*=array[i];
 }
  System.out.println("The sum of number is :"+pro);
}}

0 comments:

Post a Comment