Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int cinci(int v[21], int n) {
- int c = 0;
- for (int i = 1; i <= n; i++)
- while (v[i] != 0) {
- if (v[i] % 10 == 5)
- c++;
- v[i] /= 10;
- }
- return c;
- }
- int main() {
- int n, v[21];
- cin >> n;
- for (int i = 1; i <= n; i++)
- cin >> v[i];
- cout << cinci(v, n);
- cout << endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement