(Print distinct integers) Write a program that reads in 10 i…

(Print distinct integers) Write a program that reads in 10 integers and displays the number of distinct integers and the distinct integers in their input order and separated by exactly one space (i.e., if a number appears multiple times, it is displayed only once). (Hint: Read an integer and store it to an array if it is new. If the integer is already in the array, ignore it.) After the input, the array contains the distinct integers. Here is a sample run: Sample Run Enter ten numbers: 1 2 3 2 1 6 3 4 5 2 The number of distinct number is 6 The distinct numbers are 1 2 3 6 4 5 For a hint on this program, please see https://liveexample.pearsoncmg.com/javarevel13e.html.

You are in charge of advertising for Carl’s Camping Company….

You are in charge of advertising for Carl’s Camping Company.  You want to air television ads, but you are unsure about which TV network to place ads on.  At the end of last year Fox had a 25% market share, CBS 35%, ABC 22%, and NBC 18%.  Advertising prices for each network are based on those numbers.  Before deciding which network to advertise on, you wonder if viewing patterns have changed this year.  In order to test this, you conduct a survey of 200 of your customers and note which network they watch most often. 46 viewers chose Fox, 60 chose CBS, 59 chose ABC, and 35 chose NBC.   Class Observed(ni) Hyp Prop ExpectedE(ni) Difference(ni)- E(ni) Sq Diff[(ni)- E(ni)]2 [ ( n i ) –   E ( n i ) ] 2 E ( n i )  Fox 46             CBS 60            ABC 59             NBC  35             Question; Fill out the table above (on scratch papaer), with α = 0.10, and perform a χ2 goodness-of-fit test to determine whether viewing patterns have changed this year (i.e., whether they “fit” last year’s distribution). As with the earlier z-test question, I want to see all 7 steps, but make sure you very clearly identify your test statistic, critical value, test result, and conclusion (steps 4-7). [Note that alpha = 0.10 in this question.]