Загрузка данных


#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main() {
    ifstream file("input.txt");

    if (!file.is_open()) {
        cout << "Файл не найден";
        return 0;
    }

    string text;
    getline(file, text);

    string number = "";

    for (char c : text) {
        if (isdigit(c)) {
            number += c;
        } else {
            if (number != "") {
                cout << number << endl;
                number = "";
            }
        }
    }

    if (number != "") {
        cout << number << endl;
    }

    file.close();

    return 0;
}