Use of Rand in c program

 // use of rand function

#include<stdio.h>

#include<stdlib.h>

int main()

{

    int i;

    for(i=0;i<16;i++)

    {

        printf("% 10d",1+(rand()%6));

        if(i%5==0)

            printf("\n");

    }

}

Comments

Popular posts from this blog

Use of function in mathematics

My resume using HTML and CSS