結果
問題 | No.163 cAPSlOCK |
ユーザー |
![]() |
提出日時 | 2015-12-27 18:15:24 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 466 bytes |
コンパイル時間 | 434 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-19 07:27:24 |
合計ジャッジ時間 | 855 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%s",Fpassword); | ^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<ctype.h> int main(void){ //入力された文字列を格納する変数 char Fpassword[100] = {}; char Tpassword[100] = {}; int i,j; //入力待ち scanf("%s",Fpassword); for(i = 0;i<100;i++){ if(isupper(Fpassword[i]) == 0){ Tpassword[i] = toupper(Fpassword[i]); }else{ Tpassword[i] = tolower(Fpassword[i]); } } for(j = 0;j < 100;j++){ if(Tpassword[j] != '\0'){ printf("%c",Tpassword[j]); } } printf("\n"); return 0; }