Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: how would u write these 2 programms.

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how would u write these 2 programms.

    1.Using the data list given below to initialise an array, write programs to solve each of
    the following problems:
    • Compute the sum of the elements in the array;
    • Compute the product of the elements in the array;
    • Print only the multiples of three in the array;
    • Compute the frequency of the number 5 in the array;
    • Print all those elements that are greater than the first element and less then the
    last element;
    • Print all elements whose value is equal to their index value;
    • Compute the mean of the elements in the list.
    Data list: 2, 4, 6, 9, 5, 4, 5, 7, 12, 15, 21, 32, 45, 5, 6, 7, 12.

    2.Write a program that reads a list of 15 numbers and prints only those values that are
    greater than the last number on the list.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: how would u write these 2 programms.

    That is absolutely not how this works. We aren't a homework service, and we won't do your work for you. Read the link in my signature on asking questions the smart way, as well as this article: http://www.javaprogrammingforums.com...e-posting.html
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: how would u write these 2 programms.

    And don't double post. Keep the discussion in your other thread
    http://www.javaprogrammingforums.com...html#post55491
    I am locking this thread

Similar Threads

  1. Help me write this program.
    By HuKjr in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 6th, 2011, 11:05 AM
  2. How would you write this code?
    By laughingeyes18 in forum Object Oriented Programming
    Replies: 2
    Last Post: December 1st, 2011, 09:46 AM
  3. How to write this without
    By Scotty in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 21st, 2011, 09:04 AM
  4. How to write server?
    By snytkine in forum Java Networking
    Replies: 4
    Last Post: October 22nd, 2010, 02:25 PM
  5. how can i write this program
    By lavudyagopi27 in forum Java Theory & Questions
    Replies: 2
    Last Post: September 17th, 2010, 08:11 AM