/* * File: main.c * Author: david.kowis * * Created on August 4, 2009, 7:48 AM */#include <stdio.h>#include <stdlib.h>/* * */intmain(intargc,char**argv){intlast=1,secondLast=0,current=0;intmax=0,min=0;intx;intnumbers[10];//Fibbonaci sequenceprintf("0, 1, ");for(x=1;x<100;x++){current=last+secondLast;printf("%u, ",current);secondLast=last;last=current;}printf("\n");srand(time(NULL));//initialize random listprintf("Random numbers to find max and min of\n");for(x=0;x<10;x++){numbers[x]=rand()%1000;printf("%u, ",numbers[x]);}printf("\n");max=numbers[0];min=numbers[0];printf("Finding the max and min...\n");for(x=0;x<10;x++){if(min>numbers[x]){min=numbers[x];}if(max<numbers[x]){max=numbers[x];}}printf("Maximum: %u Minimum %u\n\n",max,min);return(EXIT_SUCCESS);}