SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Задача №112289. Сколько равно X?
  2.  
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main() {
  7.     int n, x;
  8.     int count = 0;
  9.     cin>>n;
  10.    
  11.     int arr[n];
  12.    
  13.     for (int i = 0; i < n; i++) {
  14.         cin>>arr[i];
  15.     }
  16.     cin>>x;
  17.     for (int i = 0; i < n; i++) {
  18.        
  19.         if (arr[i] == x) {
  20.             count++;
  21.         }
  22.        
  23.     }
  24.     cout<<count;
  25.     return 0;
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top