Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
- #include <math.h>
- int main() {
- char z1, z2;
- char niza[100][100];
- int x = 0;
- while(fgets(niza[x], 90, stdin)) {
- if(niza[x][0] == '#') {
- break;
- }
- x++;
- }
- scanf("%c%c", &z1, &z2);
- for(int i = 0; i < x; i++) {
- int S, E;
- for(int j = 0; j < strlen(niza[i]); j++) {
- if(niza[i][j] == z1) {
- S = j;
- }
- if(niza[i][j] == z2) {
- E = j;
- }
- }
- for(int j = S + 1; j < E; j++) {
- printf("%c", niza[i][j]);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement