Untitled

 avatar
unknown
c_cpp
a year ago
460 B
4
Indexable
#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