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() {
- FILE *vlez = fopen("podatoci.txt", "r");
- char z1, z2;
- scanf("%c%c", &z1, &z2);
- char niza[100];
- while(fgets(niza, 80, vlez)) {
- if(niza[0] == '#') {
- break;
- }
- int S, E;
- for(int i = 0; i < strlen(niza); i++) {
- if(niza[i] == z1) {
- S = i;
- }
- if(niza[i] == z2) {
- E = i;
- }
- }
- for(int i = S + 1; i < E; i++) {
- printf("%c", niza[i]);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement