Sure, here is the code:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main ()
{
FILE *log;
char *directory;
register int fir, sec, thi;
fir = sec = 0;
thi = 1;
char url[59];
log = fopen("log","w");
if (!log) {
printf("log file can not be created; please specify different directory\n");
scanf("%s", &directory);
int chdir(char *directory);
log = fopen("log","w");
}
while (thi <= 9)
{
sprintf(url,"wget http://blackboardurl/lectures/%d%d%d.ppt",fir,sec, thi);
system(url);
thi++;
if (thi == 10)
{
thi = 0;
sec++;
}
if (sec == 10)
{
sec = 0;
fir++;
}
}
return 0;
}
Hope this helps, thanks