Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <cstdlib>
- #include <cctype>
- using namespace std;
- int main()
- {
- const int max = 20;
- int i;
- char buffer[max],k;
- ifstream in("test.txt");
- while (!in.eof())
- {
- in.getline(buffer, max);
- cout << buffer << endl;
- }
- for (i = 0; i < max; i++)
- if (isdigit(buffer[i])) k = buffer[i];
- cout << k << endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement