Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include "stdlib.h"
  3. #include <iostream>
  4. using namespace std;
  5. #include <string>
  6.  
  7. int _tmain(int argc, _TCHAR* argv[])
  8. {
  9. cout <<"Student"<<"\t"<<"stipendiya"<<endl;
  10. string students [5]={"Messi","Ronaldo","Luiz","Suarez","Pukich"};
  11. string stipendiya [5]={"1000", "1300", "1250","1560","1450"};
  12.  
  13. for(int i=0;i<5;i++)
  14. {
  15. cout<<students[i]<<" ";
  16. cout<<stipendiya[i]<<endl;
  17. }
  18. int min = 0;
  19. int max = 0;
  20. int myarr[]={1000,1300, 1250,1560,1450};
  21. min=myarr[0];
  22. max=myarr[0];
  23. for(int i=0;i<5;i++)
  24. {
  25. if(min>myarr[i])
  26. {
  27. min = myarr[i];
  28. }
  29. else if (max<myarr[i])
  30. {
  31. max = myarr[i];
  32. }
  33. }
  34.  
  35. cout <<"min"<<min<<endl;
  36. cout <<"max"<<max<<endl;
  37. system("pause");
  38.  
  39. return 0;
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement