Question

I need to write a C++ program that reads two integers from a data filed called...

I need to write a C++ program that reads two integers from a data filed called "integers.dat" The first integer should be low and the other one high. The program should loop through all integers between the low and high values and include the low and high integers and then display

Display the 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

the Integers.dat simply looks as followed

100 200

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
I need to write a C++ program that reads two integers from a data filed called...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Write a C++ program that reads the values from a data file til the end of...

    Write a C++ program that reads the values from a data file til the end of the data file is reached. It displays the values read, and computes and displays the largest, smallest, and the average of these values

  • C++ Write a program that reads three positive integers (> 0) from the command line (one...

    C++ Write a program that reads three positive integers (> 0) from the command line (one at a time), then computes and prints the smallest entered number. Use if-else statements for three integer comparison. Example: Enter an integer: 5 Enter an integer: 23 Enter an integer: 7 The smallest number is: 5 Example 2: Enter an integer: 3 Enter an integer: 3 Enter an integer: 6 The smallest number is: 3 "The input must be positive number. The program should...

  • 3. Write a Java method (called sumOfSquares) that reads in a sequence of integer numbers using...

    3. Write a Java method (called sumOfSquares) that reads in a sequence of integer numbers using a Scanner object. As each integer is read, the method displays that integer. The method also accumulates the sum of the squares of the integers and displays the sum when all integers are read. The method reads integers until a negative integer is read. The negative integer should not be display or added to the sum of squares. The method will not return a...

  • Write a MIPS program that reads (with an appropriate prompt) a sequence of 20 integers and...

    Write a MIPS program that reads (with an appropriate prompt) a sequence of 20 integers and stores them in an array, and then calls the following two functions and prints the results in a readable format. The two functions are: smallestLargest: computes the smallest and the largest values in the array. oddEven: computes the number of even integers and the number of odd integers.

  • Q1. Write a C++ program that reads two integers a, and, b on the keyboard to...

    Q1. Write a C++ program that reads two integers a, and, b on the keyboard to calculate: U = (a + b)2 and V = (a - b)2 Q2. Write a C++ program to read a sequence of positive integers and to display the largest integer of that sequence. Use a negative integer to indicate the end of the data entry.

  • Assignment #9 will be the construction of a program that reads in a sequence of integers...

    Assignment #9 will be the construction of a program that reads in a sequence of integers from standard input until 0 is read, and store them in an array (including 0). This is done using iteration (choose one of for, while, or do while loop). You may assume that there will not be more than 100 numbers. Then compute the minimum number, compute the largest number among the numbers that are divisible by 2, count even numbers, and compute the...

  • 1. Write a program that reads a sequence of numbers from the keyboard, and displays the...

    1. Write a program that reads a sequence of numbers from the keyboard, and displays the smallest number. The sequence has at least one number and is terminated by -999(-999 will not appear in the sequence other than as the end marker). 2. Write a program which requests an integer input n from the keyboard and computes the sum of square of k for all k from 1 to n(inclusive). use java

  • Task 1 : Write a Java program that prompts for and reads 10 integers from the...

    Task 1 : Write a Java program that prompts for and reads 10 integers from the user into an integer array of size 10, it then: - calculates the sum and average of positive numbers of the array and displays them. [Note: consider 0 as positive] Note: The program must display the message: "There are no positive values" if the array does not contain any positive value.

  • C++ 3. Write a program that reads integers from a file, sums the values and calculates...

    C++ 3. Write a program that reads integers from a file, sums the values and calculates the average. a. Write a value-returning function that opens an input file named in File txt. You may "hard-code" the file name, i.e., you do not need to ask the user for the file name. The function should check the file state of the input file and return a value indicating success or failure. Main should check the returned value and if the file...

  • In Python 3 - Write a program that reads a sequence of integer inputs from the...

    In Python 3 - Write a program that reads a sequence of integer inputs from the user. When the user is finished entering the integers, they will enter a 'q'. There is no need to check if the entry is a valid integer. All integers in the test data (input) will be between -255 and 255. The program should then print: The smallest and largest of the inputs. The number of even and odd inputs (0 should be considered even)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT