Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  neodas
Language: C/C++
Code:
#include <stdio.h>
#include <time.h>
#include <conio.h>
#include <io.h>
#include <stdlib.h>
#include <string.h>
int main (void) 
 {
  FILE *fp;

    
  int Ay,Gun,Yil,Saat,SaatDeger;
  long timer;
  struct tm *tinfo;
  
  timer = time(NULL);
  tinfo = localtime(&timer);
  printf("Tarih: %02d/%02d/%02d\n",tinfo->tm_mday,tinfo->tm_mon+1,tinfo->tm_year+1900);
  Yil = tinfo->tm_year+1900;
  Gun = tinfo->tm_mday;
  Ay =  tinfo->tm_mon+1;
  Saat= tinfo->tm_hour;
  if((fp=fopen("neodass.bat","w"))==NULL)
    {
      printf(" dosya bulunamıyor...!\n");
      return 0;    
    }
  if (Saat<9 and Saat>=3)   SaatDeger=0;
  if (Saat<15 and Saat>=9)  SaatDeger=600;
  if (Saat<21 and Saat>=15) SaatDeger=1200;
  if (Saat>=21 or Saat<3) SaatDeger=1800;  
  
  fprintf(fp,"wget -O neodass.jpg        http://kandilli:[email protected]/xrit/000.0E/MSG/%04d/%d/%d/%d/%04d_%d_%d_%d_MSG3_13_S2_grid.jpeg\n",Yil,Ay,Gun,SaatDeger,Yil,Ay,Gun,SaatDeger);
  fprintf(fp,"wget -O neodassinfread.jpg http://kandilli:[email protected]/xrit/000.0E/MSG/%04d/%d/%d/%d/%04d_%d_%d_%d_MSG3_7_S2_grid.jpeg\n",Yil,Ay,Gun,SaatDeger,Yil,Ay,Gun,SaatDeger);
  fprintf(fp,"wget -O neodassrenkli.jpg  http://kandilli:[email protected]/xrit/000.0E/MSG/%04d/%d/%d/%d/%04d_%d_%d_%d_MSG3_16_S2_grid.jpeg\n",Yil,Ay,Gun,SaatDeger,Yil,Ay,Gun,SaatDeger);
  fprintf(fp,"ftp -i -n<nparametre\n");
  return 0;
  }
Comments: