toupperプロジェクト

toupper.c

#include <stdio.h>
#include <ctype.h>
 
int main(void){
 
  char str[260];
  int c;
  int i;
 
  printf("str: ");
  scanf("%s", str);
 
  for (i = 0; i < 260; i++){
    c = toupper((int)str[i]);
    str[i] = (char)c;
  }
 
  printf("toupper string: %s\n", str);
 
  return 0;
 
}
 

タグ:

+ タグ編集
  • タグ:
最終更新:2010年07月08日 15:12