Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- int main()
- {
- int a , b , c;
- cout << "a:";
- cin >> a;
- cout << "b:";
- cin >> b;
- cout << "c:";
- cin >> c;
- int i = 0;
- string text, word;
- ifstream al("tek.txt",ios::binary);
- while (getline(al,text)) {
- ++i;
- if (i == c) {
- string str2 = text.substr(a, b);
- cout << str2;
- }
- if (text.size() < c) {
- cout << "a";
- }
- }
- if (c > i) {
- cout << "sütün bulunamadı";
- }
- al.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement