fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void printTemperatures(double temps[]) {
  5. cout << "Температура 2-го часа: " << temps[1] << endl;
  6. cout << "Температура 6-го часа: " << temps[5] << endl;
  7. }
  8.  
  9. int main() {
  10. double temps[6] = {36.2, 37.0, 36.8, 37.2, 36.5, 36.9};
  11.  
  12. printTemperatures(temps);
  13.  
  14. temps[1] = 38.5;
  15.  
  16. printTemperatures(temps);
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Температура 2-го часа: 37
Температура 6-го часа: 36.9
Температура 2-го часа: 38.5
Температура 6-го часа: 36.9