int precip;
for (int i = 0; i < 20; i++)
{
precip = snow;
/* argument is in days */
Delay(3);
/* This sux */
precip = rain;
}
ok, so let the geek show begin... revised it a bit so it compiles and runs giving some output with a 30 days in between rains.
#include <stdio.h>
#include <unistd.h>
void Delay(int d)
{
sleep(d * 24 * 60 * 60);
}
int main(void)
{
int i, precip, snow, rain;
for( i = 0; i < 20; i++ )
{
printf("snow good\n");
/* argument is in days */
Delay(30);
/* This sux */
printf("rain sux\n");
}
return(0);
}
woohooo... even freaks can be geeks...