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/a0n9

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 : c00a.c */ /* ------------------------------------ */ #include "v_a.h" /* ------------------------------------ */ /* ------------------------------------ */ void fun(int r,int c) { double **A = r_mR(i_mR(r,c),99.); clrscrn(); printf(" A :\n"); pall_mR(A,S5,P0,C10); printf(" A :\n"); pall_mR(swapC_withR0_mR(A,C1,C2),S5,P0,C10); f_mR(A); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); int i; do { i = rp_I(R3)+R1; fun(i,i+C1); } while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ Screen output example: A : +4 +1 +2 +3 +4 +5 -66 +83 +99 +48 +0 -93 +77 -5 -67 +0 -27 +44 -33 +24 A : +4 +2 +1 +3 +4 +5 +83 -66 +99 +48 +0 +77 -93 -5 -67 +0 +44 -27 -33 +24 Press return to continue Press X to stop