Advertisement
Guest User

Untitled

a guest
May 27th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3.  
  4. using namespace std;
  5.  
  6. void so()
  7. {
  8.  
  9. }
  10.  
  11. void geo()
  12. {
  13.  
  14. }
  15.  
  16. void informacion(int day, int month, int year)
  17. {
  18. printf("Fecha de compilacion: %d-%d-%d\n", day, month, year);
  19. printf("Integrantes: Cesar Riutor, Diego Esparza, Rafael Vivar\n");
  20. }
  21.  
  22. int main(int argc, char *argv[])
  23. {
  24. FILE *archivo;
  25. archivo=fopen(argv[4],"r+");
  26. time_t t = time(NULL);
  27. struct tm tm = *localtime(&t);
  28. int day = tm.tm_mday;
  29. int month = tm.tm_mon + 1;
  30. int year = tm.tm_year + 1900;
  31.  
  32. if(strcmp(argv[1],"-so")==0)
  33. {
  34. so();
  35. }
  36. if(strcmp(argv[1],"-geo")==0)
  37. {
  38. geo();
  39. }
  40. if(strcmp(argv[1],"-v")==0)
  41. {
  42. informacion(day, month, year);
  43. }
  44. if(strcmp(argv[1],"-so")!=0 && strcmp(argv[1],"-geo")!=0 && strcmp(argv[1],"-v")!=0)
  45. {
  46. printf("OPCION INCORRECTA!!");
  47. }
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement