printf("\n%12.6f%12.6f%12.6f", r[1], ls[1], lambda);
the r
array of floats, ls
array of floats, , lambda
single float variable.
i'm trying convert program on java cannot figure out line trying (i not experienced in c @ all).
the printf()
function prints stdout, console, , uses particular variable-replacement syntax in strings - you're looking @ format string. breaking down:
\n
: newline%12.6f
: next variable,- width 12 -- padded spaces make string 12 characters if it's not already
- precision 6 -- 6 digits after decimal point
- in decimal floating point format
- +2 more iterations of this
the array lookup syntax same in java, it's looking second (because zero-based indexing) element in r , ls.