You are given a file results.txt with the results of an experiment as a set of integers. You need to separate these results into three categories: negative integers, even positive integers, and odd positive integers.
A sample of the file results.txt is shown below:
52 49 -22 31 -66 41 -94 -45 -91 -81 65 39 -37 90 -94 -12 -24 53 59 -63 -2
-11 29 42 51 -45 36 31 -68 -77 0 92 -32 17 -56 51 -49 1 40 79 92 9
-73 -70 -49 68 -49 63 -52 86 -30 -61 -50 23 -5 -30 66 17 10 84 -43 52 51
…
Write a complete C++ program that reads the data from the file results.txt and separate it into the following files:
1. A file negative.txt that contains the negative integers from the results.
2. A file even.txt that contains the even positive integers from the results.
3. A file odd.txt that contains the odd positive integers from the results.
Notes: The number of experiments is not greater than 1000, but the exact number is not known beforehand. Your program needs to check whether the file results.txt exists or not.
The negative.txt file might contain data similar to the following (note that the numbers are separated with a space):
-22 -66 -94 -45 -91 -81 -37 …
The even.txt file might contain data similar to the following (note that the numbers are separated with a space):
52 90 42 35 0 92 40 …
The odd.txt file might contain data similar to the following (note that the numbers are separated with a space):
49 31 41 65 39 53 59 …
USE C++ TO CODE THE FOLLOWING
10 have requested this problem solution
The more requests, the faster the answer.
Question :You are given a file results.txt with the results of an experiment as a set of integers. You need to separate these results into three categories: negative integers, even positive integers, and odd positive integers. A sample of the file results.txt is shown below: 52 49 -22 31 -66 41 -94 -45 -91 -81 65 39 -37 90 -94 -12 -24 53 59 -63 -2 -11 29 42 51 -45 36 31 -68 -77 0 92 -32 17 -56 ...
Problem #1: Consider the below matrix A, which you can copy and paste directly into Matlab. The matrix contains 3 columns. The first column consists of Test #1 marks, the second column is Test # 2 marks, and the third column is final exam marks for a large linear algebra course. Each row represents a particular student.A = [36 45 75 81 59 73 77 73 73 65 72 78 65 55 83 73 57 78 84 31 60 83...
RANGES
FREQUENCY
RELATIVE FREQUENCY
CUMULATIVE REL. FREQ.
1 - 10
11 - 20
21 - 30
31 - 40
41 - 50
51 - 60
61 - 70
71 - 80
81 - 90
91 - 100
'= 100 DATA
VALUES??
SO, WHAT DOES A FREQUENCY TABLE TELL US?
If
you wrote each of the above data values on a ping pong ball,, put
them in a jar and blindly pulled one out:
What is the probability that this ball...
1. Forecast demand for Year 4.
a. Explain what technique you utilized to forecast your
demand.
b. Explain why you chose this technique over others.
Year 3 Year 1 Year 2 Actual Actual Actual Forecast Forecast Forecast Demand Demand Demand Week 1 52 57 63 55 66 77 Week 2 49 58 68 69 75 65 Week 3 47 50 58 65 80 74 Week 4 60 53 58 55 78 67 57 Week 5 49 57 64 76 77...
Write a C program to assign natural numbers 1 to 100 into a one-dimensional integer array. Display all the values in the array on the screen. For each number in the array, determine if the number contains digit 7 or is divisible by 7. Display all those numbers on the screen. Original array: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27...
I need it in JAVA Write a program that randomly populates an array of size 100, sorts it, and then finds the median. The random numbers must be from 0-99 and all integer values. Also since there is an even set of numbers the median is found by taking the mean of the two middle numbers (In other words the 50th and 51st). You have to code your own sorting method. You may not use a built in java sorter....
NUMBER OF PEOPLE 10.2 10.0 10.1 8.5 10.2 8.2 8 Source: United States Census. 11. In the Sanitary District of Chicago, operating engineers are hired on of a competitive civil-service examination. In 1966, there were 223 appl for 15 jobs. The exam was held on March 12; the test scores are s arranged in increasing order. The height of each bar in the histogram next page) shows the number of people with the correspondin examiners were charged with rigging the...
Calculate the range, mean, mode, median, Standard deviation Calculate the skewness and kurtosis for the above data and interpret the data. The following is data collected from the daily salary employees of ZZ COMPANY.. 68 19 43 11 37 30 19 67 65 34 96 23 93 73 46 39 21 12 89 52 33 21 18 57 80 56 91 62 56 48 84 23 78 96 49 36 90 42 65 15 43 36 65 59 34 71...
1. On the following page are the exam scores on the first Statistics test for all my classes. Using everything we covered in the first three chapters of our textbook, describe the data. I recommend going through your notes and textbook, chapter by chapter. Include as much as you can – type of data, frequency distribution, histogram, numerical methods, etc. The standard deviation for the data is 16.7. Exam Scores on the First Statistics Test 100 88 100 86 100...
Please show how you did this in excel.
:13-19 Every home football game for the past eight years at Eastern State University has been sold out. The revenues from ticket sales are significant, but the sale of food, beverages, and souvenirs has contrib- uted greatly to the overall profitability of the football program. One particular souvenir is the football pro- gram for each game. The number of programs sold at each game is described by the following probabil- ity distribution:...