fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. return 0;
  6. }
  7. int frequency(int theArray[], int n, int x) {
  8. int count = 0;
  9. for (int i = 0; i < n; ++i) {
  10. if (theArray[i] == x) {
  11. ++count;
  12. }
  13. }
  14. return count;
  15. }
Success #stdin #stdout 0.01s 5272KB
stdin
Standard input is empty
stdout
Standard output is empty