This question already has an answer here:
I've tried but it doesn't seem to give me the desired numbers. Here's my code so far:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n, i;
printf("Value of n:\n");
scanf("%d", &n);
int t[n];
for(i=0; i<n; i++)
printf("%d ", rand()%20+30);
return 0;
}
Aucun commentaire:
Enregistrer un commentaire