fork download
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <stdio.h>
  3. int main()
  4. {
  5. int col = 0;
  6. int col2 = 0;
  7. FILE *file;
  8. FILE *input;
  9. FILE *out;
  10. file = freopen("rooms.txt", "r", stdin);
  11. scanf("%d", &col);
  12. printf("%d", col);
  13. struct Komnata
  14. {
  15. int ID;
  16. char ros[8];
  17. int chel;
  18. int cost;
  19. };
  20. int i = 1;
  21. struct Komnata nomer[1000];
  22. while (col>i)
  23. {
  24. scanf("%d %s %d %d", &nomer[i].ID, &nomer[i].ros, &nomer[i].chel, &nomer[i].cost);
  25. i++;
  26. }
  27. printf("\n%d" , nomer[2].ID);
  28. fclose(file);
  29.  
  30. input = freopen("input.txt", "r", stdin);
  31. scanf("%d", &col2);
  32.  
  33. struct Command
  34. {
  35.  
  36. };
  37. i = 1;
  38. struct Command stroka[10000];
  39. while (col2 > i);
  40. }
  41.  
  42.  
  43. //ФАЙЛ который надо прочитать.
  44. //7
  45. //ADD CLIENT SERVICE = ECONOMY BEGIN_DATE = 11.07.2020 END_DATE = 28.09.2020
  46. //GET INCOME BEGIN_DATE = 15.07.2020 END_DATE = 28.07.2020
  47. //GET QUEUE ID = 170 DATE = 27.12.2020
  48. //ADD CLIENT SERVICE = COMFORT BEGIN_DATE = 03.04.2020 END_DATE = 05.06.2020
  49. //ADD CLIENT SERVICE = STANDART BEGIN_DATE = 22.09.2020 END_DATE = 17.11.2020
  50. //GET QUEUE ID = 246 DATE = 27.12.2020
  51. //GET ROOM ID = 567
Runtime error #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
Standard output is empty