Untitled

mail@pastecode.io avatar
unknown
c_cpp
a month ago
460 B
3
Indexable
Never
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main() {
    char a;
    setlocale(LC_ALL, "Russian");
    ifstream file("ask.txt");
    
    int b = 0;
    string line;

    // Output lines 5-10
    for (int i = 0; i < 4; i++) {
        getline(file, line);
        cout << line << std::endl;
        
    }
    cin >> a;
    if (a == 98) {
        cout << "Правильно!";
        b++;
    }
}
Leave a Comment