Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int c=0,n;
- cin >> n;
- int ar[n];
- for(int i=0; i<n; i++)
- {
- cin >> ar[i];
- }
- int key;
- cin >> key;
- for(int i=0; i<n; i++)
- {
- if(ar[i]==key)
- c++;
- }
- printf("%d is found %d times in your list\n",key,c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement