Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- #define MAX 100
- //ne menuvaj!
- void wtf() {
- FILE *f = fopen("text.txt", "w");
- char c;
- while((c = getchar()) != EOF) {
- fputc(c, f);
- }
- fclose(f);
- }
- int main() {
- wtf();
- //vasiot kod ovde
- FILE *vlez=fopen("text.txt","r");
- int zbor=1,br=0;
- char c;
- while((c=fgetc(vlez)) != EOF) {
- if(zbor&&isalpha(c)) {
- if(isupper(c)) br++;
- zbor=0;
- } else if(!isalpha(c)) zbor=1;
- }
- printf("%d",br);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement