Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- void unos(char M[], int Size)
- {
- for (int i = 0; i < Size; i++)
- {
- cin >> M[i];
- }
- }
- int Rest(char M[], int Size)
- {
- int counter2 = 0;
- for (int i = 0; i < Size; i++)
- {
- if (M[i] < 'a' || M[i] > 'z')
- {
- counter2++;
- }
- }
- return counter2;
- }
- int Count(char M[], int Size)
- {
- int counter = 0;
- for (int i = 0; i < Size; i++)
- {
- if (M[i] >= 'a' && M[i] <= 'z')
- {
- counter++;
- }
- }
- return counter;
- }
- int main()
- {
- const int Size = 7;
- char Array[Size];
- unos(Array, Size);
- Count(Array, Size);
- Rest(Array, Size);
- cout << endl;
- cout << Count(Array, Size) << endl;
- cout << endl;
- cout << Rest(Array, Size) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement