03 May 2021 07:19:26 AM C_MISTAKE: C version Demonstrate some programming mistakes that are easy to make when programming in C. C_MISTAKE1: We want a table of I^J, for I = 1 to 10, and J = 0 to 5. We don't get it. I: I^0 I^1 I^2 I^3 I^4 I^5 1: 1 1 1 1 1 1 2: 1 2 2 2 2 2 3: 1 3 3 3 3 3 4: 1 4 4 4 4 4 5: 1 5 5 5 5 5 6: 1 6 6 6 6 6 7: 1 7 7 7 7 7 8: 1 8 8 8 8 8 9: 1 9 9 9 9 9 10: 1 10 10 10 10 10 C_MISTAKE2: Test a function that returns the sign (-1, 0, or +1) of a real number R: I R Sign 1 -1.00 1 2 -0.75 1 3 -0.50 1 4 -0.25 1 5 0.00 1 6 0.25 1 7 0.50 1 8 0.75 1 9 1.00 1 C_MISTAKE3: Add up 100 random numbers, and expect a result near 50. Sum of 100 random numbers is 1.1743e+11 C_MISTAKE4: Add up 100 random numbers, and expect a result near 50. Sum of 100 random numbers is 0 C_MISTAKE5: Add up 100 random numbers, and expect a result near 50. Sum of 100 random numbers is 0.979434 C_MISTAKE6: The 11 elements of row 10 of Pascal's triangle add up to 1024. Sum of row 10 is 904.12 C_MISTAKE7: Compute sin(x) and abs(sin(x)) at 10 random values. 7.43811 0.914765 0 9.03366 0.381219 0 9.83596 -0.399691 0 6.6688 0.376132 0 4.97259 -0.96634 0 1.63968 0.997628 0 8.30012 0.902121 0 8.88949 0.510091 0 0.769947 0.696097 0 6.49707 0.212258 0 C_MISTAKE: Normal end of execution. 03 May 2021 07:19:26 AM