Computes the average of the largest and smallest integer

Assignment Help Computer Engineering
Reference no: EM132100047

Please read this lab exercise thoroughly, before attempting to write the program.

Write a program that reads two integers from the text file integers.dat. The first integer should be considered the low number and the second integer the high number. The program should loop through all integers between the low and high values. The loop should include the low and high integers.

Displays the number of integers in the file

Displays the number of integers divisible by 5 OR 6, but not both.

Displays the sum of the integers from condition 2 as well as the sum of all the integers

Displays the largest integer and the smallest integer that satisfy condition number 2.

Computes the average of the largest and smallest integer

Assume the contents of integers.dat (the file is being provided for you) are as follows:

100 200

The following is a sample output: User input in red

Welcome to Wake's Integer processing Agency

What is name of the input file? integers.dat

The number of integers between the two numbers is 101

There are 32 integers that are divisible by 5 or 6 but not both

The sum of the integers that are divisible by 5 or 6 but not both is 4800

The sum of all the integers is 15150

The largest integer divisible by 5 or 6 but not both is 200

The smallest integer divisible by 5 or 6 but not both is 100

The average of 200 and 100 is 150

NOTE:

Use two decimal point precision for the average

To check your code, adjust one of the integers in the file, recompile your code and run again (suggest changing the largest and smallest integers)

Assume that the .dat can contain any two integers. The only constraint is that the first number is less than the second. Only use 100 and 200 for testing.

Reference no: EM132100047

Questions Cloud

Is mrsa a eukaryotic or prokaryotic structure : Is MRSA a eukaryotic or prokaryotic structure?
Create a mobile application that allows customers : Create a mobile application that allows customers to reserve tables at local restaurants.
What would transpire when a character utilizing the fes : What would transpire when a character utilizing the FES/NMES electrotherapy device accidentally puts it to full impulse?
Directional selection and disruptive selection : What is the distinction between Directional Selection And Disruptive Selection?
Computes the average of the largest and smallest integer : Displays the largest integer and the smallest integer that satisfy condition number 2. Computes the average of the largest and smallest integer
Anatomy of muscle contraction : In need of assistance with this. With an ATP utilization emphasis, what is the normal physiology/anatomy of muscle contraction?
Dna fragments on a gel in the process of electrophoresis : What is the force that is used to seperate DNA fragments on a gel in the process of electrophoresis?
List ways in which the mainframe of today challenges : List ways in which the mainframe of today challenges the traditional thinking about centralized computing versus distributed computing.
Difference between dependent and independent variables : What is the difference between dependent and independent variables? I am truly having a problem finding the difference between the two.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Discuss command do when typed in kali linux''s terminal

What did the following command do when typed in Kali Linux's terminal

  Performing the security review in company

performing the security review - Although there are obvious direct impacts which may be easily quantifiable financially other consequences may be less obvious

  Explain how businesses apply cryptography

Explain how businesses apply cryptography in maintaining information security.

  Create a homework class with fields for the class name

Create a Homework class with fields for the class name, the assignment (for example, "read chapter 1"), and the number of minutes predicted.

  Mean of a set of operators to be functionally complete

Are there sets of a single operator that are functionally complete?

  Write down an essay of 500-750 words in which you describe

using a graphic organizer of your choice identify and explain six technology- induced methods that can be used in your

  Compare the instruction sets and clock rates of each cpu

the CPU of one other computer. Compare the instruction sets and clock rates of each CPU. Determine which CPU of the two is faster and why.

  What are the six steps for requirements engineering

What are the six steps for requirements engineering? Describe the job of the requirements engineer with respect to stakeholder collaboration?

  What are user processes

What are user processes? What are system processes?

  Cores on computer systemssingle-processor computers were

cores on computer systemssingle-processor computers were able to handle and process smaller sets of data. as

  The shipping clerk at the rinky dooflingy company is faced

Write a program that reads the number of dooflingies to be shipped and displays the number of huge, large, medium, and small containers needed to send the shipment in the atleast number of containers and with the minimum amount of wasted space.

  Describe the three rudimentary services provide by sms

As part of GSM, describe the three rudimentary services provide by SMS. What is used for transmitting short messages between SMSC and the hand-held device?

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