結果

問題 No.163 cAPSlOCK
ユーザー Yamyuki
提出日時 2016-12-26 02:36:03
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 190 bytes
コンパイル時間 360 ms
コンパイル使用メモリ 20,608 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-14 19:10:50
合計ジャッジ時間 949 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%c",&p);
      |         ^~~~~~~~~~~~~~
main.c:8:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |                 scanf("%c",&p);
      |                 ^~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<ctype.h>
int main(){
	char p;
	scanf("%c",&p);
	while(p!='\n'){
		printf("%c",(isupper(p))?tolower(p):toupper(p));
		scanf("%c",&p);
	}
	printf("\n");
	return 0;
}
0