+1(805) 568 7317

hello i have been trying to write this following forgram in c for the past couple of 5196063

hello, i have been trying to write this following forgram in c for the past couple of days but i can not get my head around it. the program can only be written in C with C standard libraries. your help will be much appreciated.

Please take the array {

47,48,58,123,456,789,188,0,3000,47,939,2373,1873,283,948,333,283,2835,248,444,555,732,1983,473,939,3000,7,9,2496,1729,1776,11,12,84,126,120,-1} determine how many duplicate values there are in the array and what their index positions are. The output should look like: Value 1899 was found at indices: 1, 9. Value 1059 was found at indices: 20, 224, 475. Value 1607 was found at indices: 25, 120. ……. Value 2535 was found at indices: 415, 488. Total Duplicates found: XX All of the indices for a given value are listed on one line. Your program should not have more than one entry for the same number. Only numbers that have at least one duplicate should be reported. Note that the meaning of a duplicate is “two numbers at different index positions that have the same value.” This means that if a number appears n times in the array, there are a total of 2 = ∗ ( − 1) 2 duplicates for that number. Thus, if a number appears twice in the array, that contributes 1 duplicate to the total duplicate count. If a number appears 3 times, that contributes 3 duplicates. And if a number appears 4 times, that contributes (4*3)/2 = 6 duplicates to the total duplicate count.

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon

Order Now