Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
607 B
1
Indexable
Never
// Online C++ compiler to run C++ program online
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
    vector <int>numbers={5,3,5,5,8,1,2,5};
    sort(numbers.begin(),numbers.end());
    for(int i : numbers)
        cout<<i<<" ";
    cout<<"Vektori i permbysur eshte "<<endl;
    reverse(numbers.begin(),numbers.end());
    for(int i : numbers)
        cout<<i<<" ";
    cout<<"Cilin numer do kerkojme ?"<<endl;
    int a;
    cin>>a;
    int heret = count(numbers.begin(),numbers.end(),a);
    cout<<"Numri "<<a<<" ndodhet "<<heret<<" here"<<endl;
    return 0;
}
Leave a Comment