chasnasestra

Untitled

May 30th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4.  
  5. int main(){
  6. int bukva=0,i=0,maks=0;
  7. char str[100], zbor[100];
  8. FILE*fp=fopen("text.txt","r");
  9. while(fgets(str,100,fp)!=NULL)
  10. {
  11. for(i=0;i<strlen(str);i++){
  12. if(isalpha(str[i]))
  13. bukva++;}
  14.  
  15. if(bukva>maks){
  16. maks=bukva;
  17. strcpy(zbor, str);
  18. }
  19. bukva=0;
  20. }
  21. printf("%d: %s", maks, zbor);
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment