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: Write a Java program that reads an integer representing the number of floating point?

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    3
    My Mood
    Inspired
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Write a Java program that reads an integer representing the number of floating point?

    How do you Write a Java program that reads an integer representing the number of floating point numbers, then reads those numbers into an array and displays their average on the screen?


  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: Write a Java program that reads an integer representing the number of floating po

    Just like your other question, you're being way too vague. Please read the link in my signature on asking questions the smart way. What have you tried? Where are you stuck? Break your problem up into much smaller pieces, and take it one piece at a time.

    Recommended reading: 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
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Write a Java program that reads an integer representing the number of floating po

    Look at the Scanner class. It has methods to help you read in data.
    You will need to use a loop.

Similar Threads

  1. Creating a program that reads from a file
    By Twoacross in forum File I/O & Other I/O Streams
    Replies: 5
    Last Post: November 20th, 2011, 10:19 PM
  2. Declaring floating point number depending on an if statement
    By Keys767 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 11th, 2011, 01:50 PM
  3. using Eclipse and every program gives the errorr with floating numbers
    By Neera in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 30th, 2010, 12:11 PM
  4. Program that reads data from a text file...need help
    By cs91 in forum Java Theory & Questions
    Replies: 4
    Last Post: October 3rd, 2010, 07:57 AM
  5. check if a number is an integer
    By rsala004 in forum Java Theory & Questions
    Replies: 3
    Last Post: August 15th, 2009, 03:51 PM