Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <time.h>
- using namespace std;
- void so()
- {
- }
- void geo()
- {
- }
- void informacion(int day, int month, int year)
- {
- printf("Fecha de compilacion: %d-%d-%d\n", day, month, year);
- printf("Integrantes: Cesar Riutor, Diego Esparza, Rafael Vivar\n");
- }
- int main(int argc, char *argv[])
- {
- FILE *archivo;
- archivo=fopen(argv[4],"r+");
- time_t t = time(NULL);
- struct tm tm = *localtime(&t);
- int day = tm.tm_mday;
- int month = tm.tm_mon + 1;
- int year = tm.tm_year + 1900;
- if(strcmp(argv[1],"-so")==0)
- {
- so();
- }
- if(strcmp(argv[1],"-geo")==0)
- {
- geo();
- }
- if(strcmp(argv[1],"-v")==0)
- {
- informacion(day, month, year);
- }
- if(strcmp(argv[1],"-so")!=0 && strcmp(argv[1],"-geo")!=0 && strcmp(argv[1],"-v")!=0)
- {
- printf("OPCION INCORRECTA!!");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement