You are on page 1of 1

#include <stdio.

h>
#include <stdlib.h>
#include <ctype.h>

int main(int argc, char *argv[]) {

FILE *ulaz;
char c;
int broj_slova = 0;
int broj_brojeva = 0;

ulaz = fopen("argv[1]", "r");

while ((c = fgetc(ulaz)) != EOF)


if (isdigit(c))
if(c%3==0)
broj_brojeva++;

while ((c = fgetc(ulaz)) != EOF)


if (isupper(c))
broj_slova++;
printf("Broj malih slova je: %d\n", (int)broj_brojeva - (int)broj_slova);

fclose(ulaz);

exit(EXIT_SUCCESS);

You might also like