我想創建一個酒店的用戶輸入一個字符(S,D或L),並應該與代碼進一步下來的程序線。我需要幫助轉換用戶輸入(無論他們輸入它的方式)以將其轉換爲大寫,以便我可以使用if語句來執行我需要的操作。 到目前爲止我的代碼如下: public static void Main()
{
int numdays;
double total = 0.0;
char roomtype,
正如標題所說,我的文本文件中幾乎沒有大寫字母,因此如果沒有首字母大寫,所有的句子看起來都不正確。這是我的代碼到目前爲止: //This program reads an article in a text file, and changes all of the
//first-letter-of-sentence-characters to uppercase after a period a
HI我有一個字符串,如{它是一個很好的一天!是不是}。我必須將每個單詞的首字母改爲小寫,但空格也應該在那裏。爲了改變大寫,我使用了下面的代碼,但我不知道如何包含空格。 的代碼是: set wordlist { Its A Very Good Day! Isn't It }
set newlistupper [list]
for {set i 0} {$i < [llength $wordl