Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (fgets(line, 300, fp))
- {
- int string_flag = 0, comment_flag = 0;
- int i = 0;
- int len = strlen(line);
- emptyLine++;
- for (i = 0; i < len; i++)
- {
- if (line[i] == '"')
- !string_flag;
- if (line[i] == '//' || line[i] == '/*')
- {
- comment_flag = 1;
- string_flag = 0;
- }
- if (line[i] != '\n' && line[i] != '\t' && line[i] != ' ')
- {
- emptyLine--;
- break;
- }
- }
- if (strstr(line, "while") || strstr(line, "do") || strstr(line, "for"))
- {
- logical++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement