Advertisement
Filip13

temperatura

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