小文字を大文字に変換するtopper関数を使って、
#include <stdio.h>
#include <ctype.h>
int main()
{
int c[5];
c[0] = toupper('a');
c[1] = toupper('b');
c[2] = toupper('c');
c[3] = toupper('d');
c[4] = toupper('e');
for(int i = 0; i < 5; i++) printf("%c",c[i]);
printf("\n");
}
とプログラムすると
実行結果が
ABCDE
となりますが、標準入力された小文字の文字列を大文字の文字列に変換する方法がわからないので、標準入力で小文字の文字列を大文字の文字列に変換する方法を教えてください!
よろしくお願いします!
回答6件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。