From 483d63fa7249ad8d6020680c48c3cf6df35010b3 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 26 Apr 2017 16:37:39 +0200 Subject: Moved all C++ files into CPP folder --- biblioteca.cc | 57 --------------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 biblioteca.cc (limited to 'biblioteca.cc') diff --git a/biblioteca.cc b/biblioteca.cc deleted file mode 100644 index 85cd80f..0000000 --- a/biblioteca.cc +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include -#include -#include - -using namespace std; - -int main(void) -{ - ifstream filein; - ofstream fileout; - - filein.open("input.txt"); - fileout.open("output.txt"); - - time_t rawtime; - struct tm * timeinfo; - - int num[4], i = 0, j = 1, diff, tot[2]; - char ch; - string cc; - - while(!filein.eof()) - { - filein.get(ch); - if(ch != ' '){ - cc+=ch; - istringstream(cc) >> num[i]; - }else { - i++; - cc = ""; - } - } - - time(&rawtime); - timeinfo = localtime(&rawtime); - - for(i = 0; i < 2; i++){ - timeinfo->tm_year = 2001-1900; - timeinfo->tm_mon = num[j]-1; - timeinfo->tm_mday = num[j-1]; - - mktime(timeinfo); - - tot[i] = timeinfo->tm_yday+1; - j = 3; - } - - diff = tot[1] - tot[0]; - - fileout << diff; - - filein.close(); - fileout.close(); - - return 0; -} -- cgit v1.2.3-18-g5258