Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  exercise6.c
Language: C/C++
Code:
#include <stdio.h>
#include <stlib.h>
#include <time.h>
#define MAX 100
#define ROWS 5
#define COLS 4

int main(int argc, char *argv[]){
     int table[ROWS][COLS];
     int i, j;
     srand(time(NULL));

     for(i=0;i<ROWS;i++){
          for(j=0;j<COLS;j++){
               table[i][j]=rand() % MAX;
               printf("%d ", table[i][j]);
          } printf("\n");
     }
     
     return 0;
}
          
Comments: