Advertisement
Filip13

najtopliji dan

Oct 21st, 2022
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int max_temp_day;
  7. int day = 1;
  8. int max_temp = INT_MIN;
  9.  
  10. while (day <= 7) {
  11. int temp;
  12. cin >> temp;
  13.  
  14. if (temp > max_temp) {
  15. max_temp = temp;
  16. max_temp_day = day;
  17. }
  18.  
  19. day++;
  20. }
  21. cout << max_temp_day << endl;
  22.  
  23.  
  24. }
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement