Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

main. c file .c file header file so I have an error in my .c file but I don\'t u

ID: 3589979 • Letter: M

Question


main. c file



.c file


header file

so I have an error in my .c file but I don't understand what's wrong. I tried 'int' before and after the ( , but no luck.

main.c [Chapter4 71-Code Blocks 16.01 File Edit View Search Project Build Debug Fortran wxsmith Tools Tools+ Plugins DoxyBlocks Settings Help main.c x rand float.c Xrand float.hX include 7 8 #include 9 linclude Trand float.hm 10 11 int main(void) { 12 13 14 15 16 17 18 19 20 21 unsigned int seed int n. k double component reliability, a series, a parallel, series-success=0, numl num2, num3; parallel, success-0, double rand float (double a, double b) 23 24 25 26 27 28 29 30 31 printf("Enter individual component reliability: Nn") scanf ("51f" , &component-reliability;); printf ("Enter number of trials: M") scanf ("in n)E printf ("Enter unsigned integer seed: Nn") scanf "su", sseed) : srand (seed) printf "n") a-series a parallel pow(component-reliability, 3); Bcomponent reliability 3 pow (component. reliability,a) t pow component_ reliability. 3) 34 35 36 37 38 39 40 41 42 43 printf ("Analytical Reliability printf ("Series: .3f Parallel: ) t.3f ", a series, a parallel): ",n); printf ("Simulation Reliability, trials printf ("Series: .of Parallel: .3f n'. (double) series success/n, (double) parallel _success/n) return D 45 46

Explanation / Answer

rand_float.c :

Line 4 : for loop syntax is wrong.for loop does not begin with type "double" .Remove type double from that statement.

Note : I think  rand_float.c is not complete program.if you want to define for loop part in any funciton defination as per syntax .