Open Mahagowri opened 8 months ago
Team Name: ABC
File Name: c/c++ 8
Line Number: [8, 5]
Bug Description: float and i value
Solution: #include
float computeAverage(float x, float N) { float numerator = 0.0; float denominator = 0.0; for (size_t i = 0; i < N; i++) { numerator += x[i]; denominator++; } return numerator/denominator; }
int main() { float x[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; size_t N = 10; printf("%.3g\n", computeAverage(x, &N)); return 0; }
Bug Hunt Evaluation: Answer: ((8,),) Correctness: 0.5/1 Points: 50/100
b'v\x95\\x8cWR/8\x96\xa9\xd41\xabk\x11\tx\x1dA\xb68\xad\x1aWT\x15\x19\x86Z"6~ez\xe6X\xf1x\x92\x84\x0f!\xd0\xebv\x97U\xa4\xcb\x8e\x05\x12\xfc\x89\xaa\xf2\xc0\xb5\xd7\"\x15\x9f\xa5[N\x8f)\x03\x03\x14\x12\xc9\xdb\x0bDdK\xaf\xdd$\xce!\xaf\xd1f\xd2\x03\x95\xf5\xee\x91\xe9\x99\x96\x1a\xa3\xe2\xf1\xe3\xe2\x06"\x94\xc4n\xc9Oc\mV\xb6\xfe\x95X\xd8\x7f\x06\x02\xc9\xeeAg#\xf8m\xe6'
b'gAAAAABl9TN_G9plVw2liAmycp5kqR3Af8-dIUsycHXGAsm9J1dSAa6PPggjoZQj8i8uKHSJUMw1xQeFu2CsAlHrbohLZ4C55WtJzPr5XcDg2RP0gLTNU666ktrvuPVJMfWc89aEHnTvIdciJel7rVgY6OkWRya-TC1_ghm0DesUkJ1NAS3AbS-_68uGhUwXSXxpEpeeSjjpk3MC5wll6nf30zY4O_kcNUTbUrqQ8s6OAUuVCK_MJ8xCOKd5O86fw1YgFkqy1J--dkHEqTfn3ExQsaSWQj73Laf0U60XNCvDeogsoA4TiJGWJn7xnecw2GHm6fUIsEdZi_S0ogGRRvJKPWT_lGkA7tLf3-z9TXJdq-CBnkLlcv4IrQcPIuZjVEqKDE7pAFTxwvZBJNEGPck5uocLPWAnb3Q-vYTqcJ61zJQkoQG0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