Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cout<<"6. Max érték meghatározása"<<endl;
- cout<<"A tömb adatai: "<<endl;
- cout<<"n="<<n<<endl;
- cout<<"A tömb elemei: ";
- for(int i=0; i<n; i++)
- {
- cout<<setw(n)<<x[i];
- }
- cout<<endl;
- maxi=x[0];
- for(int i=0; i<n; i++)
- {
- if(x[i]>maxi)
- {
- maxi=x[i];
- }
- }
- cout<<"Az elemek közül a legnagyobb(max): "<<maxi<<endl;
- cin>>get;
- break;
Add Comment
Please, Sign In to add comment