Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- int main(int argc, const char * argv[]) {
- FILE *in = fopen("input.txt", "r");
- char c;
- char zbor[1000];
- int i = 0;
- while(fscanf(in, "%c", &c) != EOF) {
- if(isalpha(c)) {
- zbor[i] = c;
- i++;
- }
- else {
- if(isupper(zbor[0])) {
- int dali_se_mali = 1;
- for(int j = 1; j < i; j++) {
- if(isupper(zbor[j])) {
- dali_se_mali = 0;
- }
- }
- if(dali_se_mali == 1) {
- for(int j = 0; j < i; j++){
- printf("%c", zbor[j]);
- }
- printf("\n");
- }
- }
- i = 0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement