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

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

__NOTOC__ Install this file in your working directory. /* ------------------------------------ */ /* Save as : z_s.h */ /* ------------------------------------ */ /* ------------------------------------ */ void clrscrn(void) { printf("\n\n\n\n\n\n\n\n\n\n" "\n\n\n\n\n\n\n\n\n\n" "\n\n\n\n\n\n\n\n\n\n"); } /* ------------------------------------ */ void stop(void) { printf(" Press return to continue. "); fflush(stdout); getchar(); } /* ------------------------------------ */ int stop_w(void) { printf("\n Press return to continue"); printf("\n Press X return to stop "); fflush(stdout); return(toupper(getchar())!='X'); } /* ------------------------------------ */ void pause(void) { int i=0; int j=400; while(--j) {i=200000; while(--i); } } /* ------------------------------------ */ int factorial(int n) { int i = 1; int x = 1; if(n==0) return (1); for(i = 1; i <= n; i++) x *= i; return (x); } /* ------------------------------------ */ /* ------------------------------------ */ clrscrn(); clears the screen by introducing empty lines. stop(); stops the program. stop_w(); stops a while() or a do while() loop. If you want to stop the program without display on the screen you can directly use getchar();