Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- // o exercicio ler um arquivo.tx e conta quantos saltos de linhas o arquivo possui, ler via comando prompt
- int main()
- {
- int c, n = 1;
- while((c=getchar())!=EOF)
- if(c == '\n')
- n++;
- printf("%d", n-1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment