結果

問題 No.163 cAPSlOCK
ユーザー arishiki
提出日時 2015-12-23 16:35:50
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 245 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 20,864 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-18 21:45:40
合計ジャッジ時間 948 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |   scanf("%s", s);
      |   ^~~~~~~~~~~~~~

ソースコード

diff #

#include <ctype.h>
#include <stdio.h>

int main(void){
  char s[150];
  int i;

  scanf("%s", s);

  for(i=0;s[i];i++){
    if(isupper(s[i])) printf("%c", tolower(s[i]));
    else printf("%c", toupper(s[i]));
  }

  printf("\n");

  return 0;
}
0