|
|
Enter n=10 Give the observation and corresponding frequency= 1.000000 , 10.000000 1 < 10 = 1 2.000000 , 49.000000 2 < 10 = 1 3.000000 , 112.000000 3 < 10 = 1 4.000000 , 98.000000 4 < 10 = 1 5.000000 , 86.000000 5 < 10 = 1 6.000000 , 54.000000 6 < 10 = 1 7.000000 , 37.000000 7 < 10 = 1 8.000000 , 28.000000 8 < 10 = 1 9.000000 , 12.000000 9 < 10 = 1 10.000000 , 6.000000 10 < 10 = 1 _______________________ b1 & b2 are 0.370221 & 2.862203 respectivelyPress any key to continue . . . |
Enter n=11 Give the observation and corresponding frequency= 1.000000 , 10.000000 1 < 11 = 1 2.000000 , 49.000000 2 < 11 = 1 3.000000 , 112.000000 3 < 11 = 1 4.000000 , 98.000000 4 < 11 = 1 5.000000 , 86.000000 5 < 11 = 1 6.000000 , 54.000000 6 < 11 = 1 7.000000 , 37.000000 7 < 11 = 1 8.000000 , 28.000000 8 < 11 = 1 9.000000 , 12.000000 9 < 11 = 1 10.000000 , 6.000000 10 < 11 = 1 11.000000 , 0.000000 11 < 1093664768 = 1 12.000000 , 0.000000 12 < 1093664768 = 1 13.000000 , 0.000000 13 < 1093664768 = 1 14.000000 , 0.000000 14 < 1093664768 = 1 15.000000 , 0.000000 15 < 1093664768 = 1 16.000000 , -1.000000 16 < 1093664768 = 1 17.000000 , 0.000000 17 < 1093664768 = 1 18.000000 , 0.000000 18 < 1093664768 = 1 19.000000 , 0.000000 19 < 1093664768 = 1 20.000000 , 4200752.000000 20 < 1093664768 = 1 21.000000 , 0.000000 21 < 1093664768 = 1 22.000000 , 0.000000 22 < 1093664768 = 1[program crashes] |
Enter n=11 Give the observation and corresponding frequency= 1.000000 , 10.000000 1 < 12 = 1 2.000000 , 49.000000 2 < 12 = 1 3.000000 , 112.000000 3 < 12 = 1 4.000000 , 98.000000 4 < 12 = 1 5.000000 , 86.000000 5 < 12 = 1 6.000000 , 54.000000 6 < 12 = 1 7.000000 , 37.000000 7 < 12 = 1 8.000000 , 28.000000 8 < 12 = 1 9.000000 , 12.000000 9 < 12 = 1 10.000000 , 6.000000 10 < 12 = 1 11.000000 , 0.000000 Segmentation fault: 11 (core dumped) |
for 'n' up to 10 the program works as expected |
false
int arr[] = { 7, 3, 8 };
f[i] = values[i];
overwrites 'n' with garbage like 1093664768.might cycle back to the first |