Write a program that reads in the first 400 integers

Assignment Help Basic Computer Science
Reference no: EM131052119

Write a program that reads in the first 400 integers from a file without storing them in an array, and prints out only those integers that are evenly divisible by both 3 and 7. The numbers should appear in your output in the same order as they appeared in the file and should be printed 8 per line. Once the numbers are printed, you should also print a sentence on a new line announcing the sum of all 400 numbers, and a separate sentence on a new line announcing the sum of only the numbers printed. Finally, your program should report the percentage of the 400 numbers that were printed. Run your program three times on april.txt, may.txt, and june.txt in that order.

Reference no: EM131052119

Questions Cloud

Initialize the array with the appropriate number of values : Calculate the sum of the total miles you spent running over the 10 weeks. Calculate the average number of miles you ran.
Explain the effect on the nephron : Explain the effect on the nephron, urine, and hormone levels of drinking 36oz of water, salt water, and beer.
What laws are passed and what resources are allocated : In what way is a criminal justice agency influential in the process of making law? Should criminal justice agencies have a say in what laws are passed and what resources are allocated?
Evolution of disease resistance in domestic turkeys : What would you predict about the evolution of disease resistance in domestic turkeys? If we observe that domestic turkeys are less resistant, does that necessarily mean that wild females had been choosing more-resistant males, or are other hypothe..
Write a program that reads in the first 400 integers : Finally, your program should report the percentage of the 400 numbers that were printed. Run your program three times on april.txt, may.txt, and june.txt in that order.
What is evolution : What is Evolution? And who was the person who came up with the theory for the term?
Compute the balance of investment in krypton labs inc stock : On January 15, 2012, National Star Inc. purchased 112,000 shares of Krypton Labs Inc. directly from one of the founders for a price of $36 per share. Determine the December 31, 2012, balance of Investment in Krypton Labs Inc. Stock.
Provide speed-low unit processing costs : sophisticated tracking and decision support systems to increase operations efficiency and effectiveness for both manufacturing and service environments. The main drawback in many technology decisions is the high axed cost of purchasing and impleme..
What are most professional ways to manage these challenges : What are the most appropriate and most professional ways to manage these challenges?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Need a public function bool fight

Grading: For each programming assignment, you are graded by explaining and demoing your code to a TA. You must demo your program BEFORE the next assignment is due, and if you fail to do so, you will automatically lose 50 points! Your job is to con..

  Prompts the user to input an integer between 0 and 35

The first line indicates that the box ticket price is $250 and 5750 tickets were sold at that price. Please type above information into a text file and write a program to read those data and output the number of tickets sold and the total sale amo..

  The largest available hole in the main memory

In which of the storage placement strategies a program is placed in the largest available hole in the main memory?

  Explain what is meant by data validation

(TCO 7) (a) Explain what is meant by data validation and discuss why it is important in programming.

  Customer driven analytics to make managerial decisions

Demonstrate your understanding and knowledge gained about session's material. Complete with a short discussion (one paragraph) for each question on a Word document and upload through the courseware.

  Allow a grocery store to keep track of the total number

Write a program that will allow a grocery store to keep track of the total number of bottles collected for seven days.  The program should allow the user to enter the total number of bottles returned for seven days.  The program will

  Activity diagram of each step of ordering pizza

Draw an activity diagram representing each step of the process; from the moment you pick up the phone to the point where you are eating the pizza.

  Write the code for invoking a method named sendobject

Write the code for invoking a method named sendObject . There is one argument for this method which is of type Customer . Assume that there is a reference to an object of type Customer , in a variable called John_Doe . Use this reference as your a..

  Describe digital forensics and process management.

Consider that Data Security and Policy Assurance methods are important to the overall success of IT and Corporate data security.

  What are the primary components of a wlan

Why does implementing RTS/CTS help speed data transmission?

  Describe and explain internet protocol security (ipsec)

As a group, describe and explain Internet protocol security (IPSec), and then as a group, decide who will be assigned the following topic or question:

  Different entities or objects, logical process

Different entities or objects, logical process, data flows, and data stores that are involved starting from the time of submitting a time sheet

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd