SHARE
TWEET

starfield

Archon Nov 25th, 2010 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main(){
  6.    int i, j, numSpaces;
  7.    srand(time(0));
  8.    for (i = 0; i != 20; ++i){
  9.       numSpaces = rand() % 19;
  10.      
  11.       //print
  12.       for (j = 0; j != numSpaces; ++j)
  13.          printf(" ");
  14.       printf("*\n");
  15.  
  16.    }
  17. }
RAW Paste Data
Top