Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "stdlib.h"
- #include <iostream>
- using namespace std;
- #include <string>
- int _tmain(int argc, _TCHAR* argv[])
- {
- cout <<"Student"<<"\t"<<"stipendiya"<<endl;
- string students [5]={"Messi","Ronaldo","Luiz","Suarez","Pukich"};
- string stipendiya [5]={"1000", "1300", "1250","1560","1450"};
- for(int i=0;i<5;i++)
- {
- cout<<students[i]<<" ";
- cout<<stipendiya[i]<<endl;
- }
- int min = 0;
- int max = 0;
- int myarr[]={1000,1300, 1250,1560,1450};
- min=myarr[0];
- max=myarr[0];
- for(int i=0;i<5;i++)
- {
- if(min>myarr[i])
- {
- min = myarr[i];
- }
- else if (max<myarr[i])
- {
- max = myarr[i];
- }
- }
- cout <<"min"<<min<<endl;
- cout <<"max"<<max<<endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement