#include <iostream>
using namespace std;
// array monodimensionali;
// 1) definizione e caricamento
//2) stampa
//3) ricerca sequenziale del primo vettore
int V[10];
int i;
int main() {
//caricamento
for (i=0; i<10; i++)
cin>>V[i];
//stampa
for (i=0; i<10; i++)
cout<<V[i]<<"\t";
//ricerca sequenziale
int count=0;
for (i=0; i<10; i++)
if(V[i]==V[0]){count++;}
cout<<endl<<V[0]<<" è presente "<<count<<" nel vettore"<<endl;
//ricerca sequenziale
count=0;
for (i=0; i<10; i++)
if(V[i]==V[9]){count++;}
cout<<endl<<V[9]<<" è presente "<<count<<" nel vettore"<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwovLyBhcnJheSBtb25vZGltZW5zaW9uYWxpOwovLyAxKSBkZWZpbml6aW9uZSBlIGNhcmljYW1lbnRvCi8vMikgc3RhbXBhCi8vMykgcmljZXJjYSBzZXF1ZW56aWFsZSBkZWwgcHJpbW8gdmV0dG9yZQppbnQgVlsxMF07CmludCBpOwppbnQgbWFpbigpIHsKLy9jYXJpY2FtZW50byAKZm9yIChpPTA7IGk8MTA7IGkrKykKCWNpbj4+VltpXTsKCS8vc3RhbXBhCglmb3IgKGk9MDsgaTwxMDsgaSsrKQoJY291dDw8VltpXTw8Ilx0IjsKCQoJLy9yaWNlcmNhIHNlcXVlbnppYWxlCglpbnQgY291bnQ9MDsKCWZvciAoaT0wOyBpPDEwOyBpKyspCgkJaWYoVltpXT09VlswXSl7Y291bnQrKzt9Cgljb3V0PDxlbmRsPDxWWzBdPDwiIMOoIHByZXNlbnRlICAiPDxjb3VudDw8IiBuZWwgdmV0dG9yZSI8PGVuZGw7CgkJLy9yaWNlcmNhIHNlcXVlbnppYWxlCgljb3VudD0wOwoJZm9yIChpPTA7IGk8MTA7IGkrKykKCQlpZihWW2ldPT1WWzldKXtjb3VudCsrO30KCWNvdXQ8PGVuZGw8PFZbOV08PCIgw6ggcHJlc2VudGUgICI8PGNvdW50PDwiIG5lbCB2ZXR0b3JlIjw8ZW5kbDsKCQkKCXJldHVybiAwOwp9