카타 8급 Is the string uppercase?

C[ | ]

#include <stdbool.h>
bool is_uppercase(const char *syntaxhighlight) {
  while(*syntaxhighlight) {
    if(islower(*syntaxhighlight)) return false;
    syntaxhighlight++;
  }
  return true;
}
#include <stdbool.h>
bool is_uppercase(const char *syntaxhighlight) {
  while(*syntaxhighlight) {
    if( 'a' <= *syntaxhighlight && *syntaxhighlight <= 'z' ) return false;
    syntaxhighlight++;
  }
  return true;
}
#include <stdbool.h>
bool is_uppercase(const char *syntaxhighlight) {
  for(int i=0; syntaxhighlight[i]!=0; i++) {
    if(syntaxhighlight[i] >='a' && syntaxhighlight[i] <='z') return false;
  }
  return true;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}