20 integers saved in a file called "data.txt"

Assignment Help C/C++ Programming
Reference no: EM13161730

There are 20 integers saved in a file called "data.txt" (just a random txt file with some numbers) All integers are in the range from 1 to 10

greater than 10 or less than 1). Assume you obtained these numbers from an experiment you (or someone else) ran, and now you want to write a program to do the data analysis.

Your data analysis must include:

1) Find the Arithmetic Mean of the 20 integers (this will be a floating point number).

2) Generate a table that lists each integer from 1 to 10 and the number of times it occurs. (This would be the precursor step to generating a histogram, which is NOT required in this problem)

3) Find the mode of the 20 integers (see below for the definition of a mode).

Example Output:

The mean of the data was 5.600000

The mode of the data was7

Integer Occurences

---------------------------

1 2

2 3

3 0

4 1

5 2

6 3

7 4

8 2

9 2

10 1

You must output the three values on the output screen and if possible, also on an output file called "results.txt"

 

 

Reference no: EM13161730

Questions Cloud

Ask the user how many times you want to run : c the algorithm. 2. Then choose a word at random from the array of Strings as the target (Use the integer random number generator)
Build a table of reynolds numbers at flow velocities : Write a program code to compute and build a table of Reynolds numbers at flow velocities varying from 100 to 1000 ft/sec (at increments of 100)
In psuedocode, design an application : In psuedocode, design an application that has an array of at least 20 integers. It should call a module that uses the sequential search algorithm to locate one of the values
Least number of comparisons needed : What is the least number of comparisons needed to sort an array of 6 numbers, in the worst case, using any sorting algorithm that sorts with binary comparisons? Explain
20 integers saved in a file called "data.txt" : There are 20 integers saved in a file called "data.txt" (just a random txt file with some numbers) All integers are in the range from 1 to 10
All the new strings generated : Explain why, if on some round, all the new strings generated for any syntactic category are longer than s, and s has not already been generated for L(), then s cannot ever be put in L(). Hint: Use Exercise 11.3.5.
Brownian motion is a physical phenomenon : Brownian motion is a physical phenomenon which can be observed, for instance, when a small particle is immersed in a liquid.
Write a program code to compute and build a table of reynold : Write a program code to compute and build a table of Reynolds numbers at flow velocities varying from 100 to 1000 ft/sec (at increments of 100)
Method called printpowersof2 that accepts a maximum number : Write a method called printPowersOf2 that accepts a maximum number as an argument and prints each power of 2 from 20 (1) up to that maximum power, inclusive. For example, consider the following calls: printPowersOf2(3); printPowersOf2(10)

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Assessment system of a university

Write a program for Assessment system of a University

  Program that stores a series of numbers in a binary tree

Write a program that stores a series of numbers in a binary tree

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  Write c++ program that reads in the average monthly rainfall

Write a C++ program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months

  Returns a count of the steps through the sort

Please write a c++ implimentation that returns a count of the steps through the sort. (do not worry about updating count, I will rewrite that segemnt. I need help with writing the shell sort.

  Write main function to compute stress-strain in steel rod

Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compression loads.

  Ruby implement primitive types

How does Ruby implement primitive types, such as those for integer and floating-point data?  3-What is the single most important practical difference between Smalltalk and C++?

  Write c++ programs

Write a C++ program to accept distance in kilometers, coverts it to meters and then displays the result. Write a C++ program to find area and circumference of a circle.

  Write a program to make the ssds function

Write a program to make the SSDs function as a MM:SS real-time clock. Hint: You must not use a single delay routine for the one second delay because that will not allow for persistence of vision. The displays need to be constantly refreshed during ev..

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

  Write c program that forks two child processes

Write a C program that forks two child processes. The parent process will print all prime numbers up to 229, the first child process will print the first 50 Fibonacci numbers.

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

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