Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int M[10];
- for(int i = 0; i < 10; i++){
- cout << i << ". ";
- cin >> M[i];
- }
- int didz = 0, ididz;
- for(int i = 0; i < 10; i++){
- if(didz < M[i]){
- didz = M[i];
- ididz = i;
- }
- }
- cout << "Didziausias masyvo narys = " << didz << ", jo indeksas = " << ididz;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement