Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     //int temp_mon, temp_tue, temp_wed, temp_thu, temp_fri, temp_sat, temp_sun;
  8.     int temp[7];            // stworzenie tablicy z siedmioma elementami
  9.     for(int i = 0; i < 7; ++i)
  10.     {
  11.         cout << "podaj temperature w dniu nr " << i + 1 << ": ";
  12.         cin >> temp[i];
  13.     }
  14.     cout << "Temperatury w poszczegolnych dniach wynosily: ";
  15.     for(int i = 0; i < 7; ++i)
  16.     {
  17.         cout << temp[i];
  18.         if(i < 6)
  19.             cout << ", ";
  20.         else
  21.             cout << ".\n";
  22.     }
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement