Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- #include <cmath>
- int main() {
- struct bukva { char l; bukva* next; };
- bukva* head, * p; char ch; FILE *f;
- fopen_s(&f, "input.txt", 'r');
- head = p = new bukva;
- fopen_s(f, &f, "input.txt", 'r');
- fscanf_s(f, "%c", &ch);
- while (ch != "/n") {
- p->next = new bukva; p = p->next; p->l = ch;
- scanf(f, "%c", &ch);
- }
- p->next = NULL;
- fclose(f);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement