Untitled
unknown
c_cpp
2 years ago
460 B
9
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++;
}
}Editor is loading...
Leave a Comment