Write a program that uses a while loop to read 10 integer numbers from file

–1 vote
  1. Write a program that uses a while loop to read 10 integer numbers from file “numbers.in” and prints their sum and average on the screen as follows:

                 The sum is n and average is m.

   Where n and m are the computed sum and average, respectively

Apr 16, 2020 in Java by MIH
• 150 points
2,221 views

Hey, 

Regarding your query, you can go through this: https://www.edureka.co/community/31195/using-while-loop-i-want-to-print-10-even-numbers

I hope this will be helpful.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Java

0 votes
1 answer

How to Read/Write String from a File in Android

Writing a File in android: private void writeToFile(String ...READ MORE

answered Oct 3, 2018 in Java by sharth
• 3,370 points
7,396 views
+4 votes
4 answers

Using while loop i want to print 10 even numbers

Hello @Nitesh, you are pretty much there. ...READ MORE

answered Nov 22, 2018 in Java by Priyaj
• 58,020 points
93,234 views
0 votes
3 answers

How to read a Text File in Java?

You can use readAllLines and the join method to ...READ MORE

answered Jul 28, 2018 in Java by samarth295
• 2,220 points
2,535 views
0 votes
1 answer

Is it possible to run a java program from command line on windows?How?

  Let's say your file is in C:\myprogram\ Run ...READ MORE

answered Apr 18, 2018 in Java by sophia
• 1,400 points
2,721 views
0 votes
2 answers

How to read a text file in Java?

You can use Scanner class to read ...READ MORE

answered Aug 9, 2018 in Java by Parth
• 4,640 points
1,165 views
0 votes
1 answer

How to download and save a file from Internet using Java?

public void saveUrl(final String filename, final String ...READ MORE

answered May 25, 2018 in Java by Rishabh
• 3,620 points
928 views
0 votes
1 answer

What is the simplest way to read JSON from a URL in java

Read json from url use url.openStream() and read contents ...READ MORE

answered Jun 13, 2018 in Java by samarth295
• 2,220 points
5,202 views
+1 vote
2 answers

Is there a code to find 64-bit JVM or 32-bit JVM (from within a program)?

Do I need to understand the difference ...READ MORE

answered Jun 11, 2019 in Java by Jim
• 810 points
2,316 views
0 votes
1 answer

How to download a file from spring controllers?

@RequestMapping(value = "/files/{file_name}", method = RequestMethod.GET) public void ...READ MORE

answered Sep 4, 2018 in Java by code.reaper12
• 3,500 points
2,984 views
+1 vote
1 answer

How to print factorial of a number using While loop?

While also works like for just you ...READ MORE

answered Nov 22, 2018 in Java by Namitha
1,392 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP