Public feed #530862

Anonymous

public text v1 · immutable
Raw Edit
·published 2007-06-02 08:26 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#define FILENAME "words.txt"

int main()
{
	int number_of_words = 15, i, j = 8, saks;
	time_t t;
	void srand(int unsigned seed);
	char words[65][81];     // Holds the words to be entered
                            // Word 64 is reserved and used for swapping
	char perkataan[20];
	FILE *pointer;
	pointer = fopen(FILENAME, "r");

	srand((unsigned) time(&t));
	saks = rand()%88;

	for(i = saks; i < 188; i+=j)
	{
	fscanf(pointer, "%s", &perkataan);
	strcpy(words[1], perkataan);
	printf("%s\n", words[1]);

	srand((unsigned) time(&t));
	j = srand()%10;
	}



}