Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int NumberOfDigits = 0;
- int Reverse();
- int main() {
- cout << "Write text ";
- int NumberOfDigits = Reverse();
- cout << "Number of numbers in text:" << NumberOfDigits<<endl;
- system("pause");
- }
- int Reverse() {
- char text;
- cin >> text;
- if (text != '.')
- {
- if (isdigit(text)) {
- NumberOfDigits++;
- }
- Reverse();
- }
- return NumberOfDigits;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement