Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Linear Algebra and the C Language/a0fi

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

__NOTOC__ Install and compile this file in your working directory. /* ------------------------------------ */ /* Save as : c00b.c */ /* ------------------------------------ */ #include "v_a.h" /* ------------------------------------ */ /* ------------------------------------ */ double **X_rp_mR( double **A, int n ) { int r; int c; for (r=R1; r<A[R_SIZE][C0]; r++) for (c=C1; c<A[C_SIZE][C0]; c++) A[r][c] = rp_I(n); return(A); } /* ------------------------------------ */ /* ------------------------------------ */ void fun(int r, int c) { double **A = rp_mR(i_mR(r,c),99); clrscrn(); printf(" rp_mR() : positive numbers \n\n" " A[R%d,C%d] :",rsize_R(A),csize_R(A)); p_mR(A,S4,P0,C6); f_mR(A); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); do fun(rp_I(R8),rp_I(C9)); while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ Positive numbers: Screen output example: rp_mR() : positive numbers A[R4,C3] : +18 +67 +59 +91 +71 +44 +37 +53 +56 +7 +90 +32 Press return to continue Press X return to stop