Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- FILE *fp;
- char c;
- int n = 0;
- int el1=1;
- int el2=1;
- fp = fopen("notes", "r");
- if(fp == 0)
- {
- printf("не могу открыть файл notes");
- return 0;
- }
- while((c = getchar() || el2 || el1 )!= EOF)
- {
- fscanf(fp, "%d",&el1);
- fscanf(fp, "%d",&el2);
- printf("%d, %d", el1, el2);
- if (el2 > el1) {
- ++n;
- }
- else {
- n = 0;
- }
- }
- printf("%d", n);
- return 0;
- }
Add Comment
Please, Sign In to add comment