Last active
March 21, 2019 16:40
-
-
Save lifostack/7cbc65ec8952fbca1e606273d6c33bc4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define MONTHS 12 | |
#define YEARS 5 | |
int main(void) | |
{ | |
float rain[YEARS][MONTHS]; | |
int b; | |
for (int x = 0; x < YEARS; x++) | |
{ | |
srand(x); | |
for (int y = 0; y < MONTHS; y++) | |
{ | |
b = rand(); | |
rain[x][y] = b; | |
printf("RAIN[%d][%d] = %d\n",x,y,rain[x][y]); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment