Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Feb 9th, 2010 | Syntax: C++ | Size: 0.45 KB | Hits: 32 | Expires: Never
Copy text to clipboard
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. extern "C" int FrequentNumber(int size, int *s);
  5. int main()
  6. {
  7.         cout << "Enter the number of numbers in array :" ;
  8.         int n; cin >> n;
  9.         //int *s = new int[n];
  10.         int s[333];
  11.         cout << "Enter " << n << " numbers of your array:\n";
  12.         for (int i=0; i<n; i++)
  13.                 cin >> s[i];
  14.  
  15.         cout << "The most freauent digit in all these numbers is: ";
  16.         cout << FrequentNumber(n, s) << endl;
  17.         cout <<  endl;
  18.         return 0;
  19. }