Advertisement
Dani_info

inaltimea minima_for

Oct 31st, 2017
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int h, h_min, n, i;
  8.  
  9. cout<<"Introduceti numarul elevilor din clasa:";
  10. cin>>n;
  11. h_min=h;
  12. for(i=1; i<=n; i++)
  13. {
  14. cout<<"Introduceti inaltimea elevului:";
  15. cin>>h;
  16. if(h<h_min)
  17. h_min=h;
  18. }
  19. cout<<"Inaltimea minima este:"<<h_min;
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement