Linear Algebra and the C Language/a0e7


Install and compile this file in your working directory.

/* ------------------------------------ */
/*  Save as :   c00c.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------	*/
int main(void)
{
time_t t;

  srand(time(&t));
  
	do{
		
  	clrscrn();          
		
	printf("random numbers (p for positive numbers) \n\n");	
	
	printf(" r_I(9) : [-9,9]  x = %+d \n",    r_I(9));
	printf("rp_I(9) : [ 1,9]  x = %+d \n\n", rp_I(9));
	
	printf("random numbers (0 for with zero) \n\n");	
	
	printf(" r0_I(9) : [-9,9]  x = %+d \n", r0_I(9));
	printf("rp0_I(9) : [ 0,9]  x = %+d \n",rp0_I(9));
	
    }while(stop_w());
		
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Screen output example:

                                                                                       
random numbers (p for positive numbers) 

 r_I(9) : [-9,9]  x = +1 
rp_I(9) : [ 1,9]  x = +5 

random numbers (0 for with zero) 

 r0_I(9) : [-9,9]  x = +2 
rp0_I(9) : [ 0,9]  x = +2 

 Press   return to continue
 Press X return to stop