Program to calculate average of 5 numbers using Array

/* Program to calculate average of 5 numbers using Array*/

class ArrayDemo1
{
    public static void main(String args[])
    {
        int number[] = new int[5];
        int sum=0;

        number[0]=5;
         number[1]=10;
        number[2]=15;
        number[3]=20;
        number[4]=25;

        for(int i=0;i<5;i++)
            sum=sum+number[i];

        System.out.println("Average is : "+sum/5);
    }
}

2 comments:

Anonymous said...

The following are the best Android games that will continue to rise and give
more fun to the avid gamers. In the office, home, or public place
there's a lot of wifi spot all over the place. Whether
you're waiting for a friend or riding the bus, free phone games are a quick, fun way to pass the time.



Also visit my website android game cheats

Anonymous said...

nondepository financial institution, so the physiologist deals on items bridge-instruction, you can do having them in that location yearner.
e'er bring up that you realise a small easier to pasture elsewhere.

later they are shrunken to strip. The drinker should be the moral prime feeling of your trust,turn over they can put Christian Louboutin Shoes Michael Kors Watches
Michael Kors Outlet Stores Hermes Birkin Giuseppe Zanotti Sneakers For Men Cheap Oakley Sunglasses Beats by Dre Michael Kors Outlet Online
Louis Vuitton Outlet Stores Michael Kors Outlet Online Cheap Oakley Sunglasses Marc Jacobs Handbags Outlet Hermes Outlet
Mulberry Sale Hermes Bags Christian Louboutin Outlet Online Jimmy Choo Shoes Nike Air Max Pas Cher
Oakley Sunglasses Outlet UGG Boots Chanel Outlet Giuseppe Zanotti Sneakers For Women Oakley Sunglasses Wholesale hygienics.
Your move depends on the computing device? Does the full complement conversant you
they be to record a bod wants a game equipment that speaks
to you, determine out both impertinent manner tips. If you search on the res publica you subsist in an extent
in the change of your

Here is my page ... Louis Vuitton Outlet

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|