2 喜歡 0 不喜歡
5.3k 瀏覽
請寫一個程式將輸入的小寫字母都轉成大寫字母

輸入說明:

會輸入一連串的字元,最後會用一個*作為結束

輸出說明:

請將輸入的所有小寫字元都轉成大寫字元輸出,如果不是小寫字元就不做任何輸出。

輸入範例;

1234567890ABCDEFGHIJKlmnopqrstuvwxyz*

輸出範例:

LMNOPQRSTUVWXYZ
[練習] Coding (C) - 最新提問 分類:2017-1 程式設計(一)AD | 用戶: (18k 分)
ID: 31088 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 5.3k 瀏覽

31 個回答

0 喜歡 0 不喜歡
內容已隱藏
#include ** * * ** * * * *
#include *** * ** **
#include ** ***** * *

int main(int argc, char const *argv[])
{
* * * * * * char ** **
* * * * ** int len,i;
** *** *** ***** *** ** ***
* ** * * * * ** {
*** *** *** * ** * **** ** * ***
* *   **** * * * *
**** * **** * ***** * ** * ** ** ** * * * *****
*** * ** ** * **** {
** ** **** * * ** * * ** *** * * ** * ** * * ** * * * * * *****
***** ** **   * * * ** * ** * ** * *** * * *** * ** **** **
* * * * ** ** ** }

** *** * }
** *** * * return 0;
}
最新回答 用戶: (114 分)
0 0
Case 0: Correct output
0 0
-----------Re-judge-----------
Case 0: Correct output
0 喜歡 0 不喜歡
內容已隱藏
** ** * ** **
** * * * * *** *
int main()
{
* * * ** *** char arr[100];
** * * ** * ** * *** *** *
*** * * ** ** {
** * ** * ** * ** int * ** ***
*** *** ** *     ** * ** *
* * *     {
* * * * *** ** ** * ** ** * * ****** * ** * ** ********* **** ***
* ** * * * * ** * * ** *** ** * * * * ** **** * * **** * ****
** * * *** * **** *** * * }
*   }
******* * * return 0;
}
最新回答 用戶: (100 分)
0 0
Case 0: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
int main()
{
   int i,j=0;
** * *** ** * **** a[1000],s[1000];
** *** *** *** ** ** * ** ** ** ***

* * ** * * ** * ** * * **
   {
* * *** * * * * * * *** ***** *** ** * * * ** * ** * ***

* * * *** * ** **** * * *
* * * ** * ** * *** * ** * * * * * *** *** * * * ** * * **
** * ** ** ** ** * ** * * * * * ** ** * ** ** * *** * ** * * *
* * * * * ** * ** * * * * **
*** ** *** * *** * * * ** * * * ** * * ***** * * **
* ** * * * *** * ** ** * ** ****** *** * ** ** * **
  }

** * * * ** * *** *** *** ****** * * * * *

 return 0;
}
最新回答 用戶: (172 分)
修改於 用戶:
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main(){
* * *** * ** * * * s1[1000];
*** ** ** * ** ** * * * i=0;

** * *** * ** ** ** * * *** s1 string

* *** ** ** *** * ** ********** ** **** *
** *** ** * * * * ** *** * * * ****** * *** *** * ** ** * * * * * ** ** ******* ****** * * *
* ******** * * ** * *** ** *** * * *** * *** * *** * * ** *** ****** ** * * * **** ** *
** * * ** **** * ** ** * * * * * *
* * ** ** *** ** *** * * *

*** **** ** ** * * 0;
}
最新回答 用戶: (212 分)
0 0
prog.c:2:19: fatal error: conio.h: No such file or directory
 #include <conio.h>
                   ^
compilation terminated.
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
#include <string.h>
int main(){
* ** ***** ** * * * s1[1000];
** * * ** * ** * *** ** i=0;

* *** * * * ****** **** * * ******
* ** ***** *** * *
   int k=strlen(s1);
* ** ** ***** ** **** ****
* ** * * ** ** ** * ***** ** * * * 0 ;
** * * **** * * ** * * * ** * ****
** * **** * * **** * **** ******* ** ** * * ** ** ** * *** * * * **** *** *
* ***** *** *** **** ** ** **** * *** ** ** *** ** * *** * * * * * * * **** ****** * ***
*** ** ** ** ** ** * * ***** **************
** ** * * * ** * **

* ****** * * ** * ** ** * 0;
}
最新回答 用戶: (194 分)
修改於 用戶:
0 0
prog.c:2:19: fatal error: conio.h: No such file or directory
 #include <conio.h>
                   ^
compilation terminated.
0 0
prog.c: In function 'main':
prog.c:7:5: warning: 'gets' is deprecated [-Wdeprecated-declarations]
     gets(s1);
     ^~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/tmp/ccb3kRGx.o: In function `main':
prog.c:(.text+0x2f): warning: the `gets' function is dangerous and should not be used.
0 0
prog.c: In function 'main':
prog.c:7:5: warning: 'gets' is deprecated [-Wdeprecated-declarations]
     gets("%s",s1);
     ^~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
prog.c:7:5: error: too many arguments to function 'gets'
     gets("%s",s1);
     ^~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
0 0
Case 0: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
int main()
{
   char ch;
** *** *** * ** * * ***** * * *** *** * ****
** ***** * * * ** * *** * **** *** * * **** *
* **** ******* ***** * ** *** **** ** * *
* * ** ** ** ***** * ** * * **

*** * ******* *** ** ** * **** *
** * * * * *** ***
   {
* ** ** * * * * ** * * *** **** * ***** * * ** **** *****
** ** * * *** *** * *** ** ** ***** ** * ** *
** ***** * ** ** * ** * * *** ** ** ** ****** ** ****** ** * ** ***** *
** * * *** ****** * **** *** *
** * ** **** * ** *** ** ****** ** ** * ** ******** * ** *** *** ** **** *
   }
   
   return 0 ;
}
最新回答 用戶: (194 分)
0 0
prog.c: In function 'main':
prog.c:10:4: error: expected ';' before 'printf'
    printf("%d\n",ch);
    ^~~~~~
prog.c:11:7: warning: implicit declaration of function 'isalunm' [-Wimplicit-function-declaration]
    if(isalunm(ch))
       ^~~~~~~
prog.c:13:8: warning: implicit declaration of function 'print' [-Wimplicit-function-declaration]
        print("%ch\xe5\xad\x97\xe4\xb8\xb2\xe7\x82\xba\xe5\xad\x97\xe6\xaf\x8d\n",ch);
        ^~~~~
prog.c:14:11: warning: implicit declaration of function 'islower' [-Wimplicit-function-declaration]
        if(islower(ch))
           ^~~~~~~
prog.c:15:46: warning: implicit declaration of function 'toupper' [-Wimplicit-function-declaration]
         printf("\xe5\xb0\x87\xe5\xad\x97\xe6\xaf\x8d\xe8\xbd\x89\xe6\x88\x90\xe5\xa4\xa7\xe5\xaf\xab:%ch\n",toupper(ch));
                                              ^~~~~~~
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
int main()
{
 int i,j=0;
 char a[1000],s[1000];
* * * * * * ** *

***** ** **** ** * * **
  {
* * * ** *** * * ** **** * * ***** * * * ** * **

** *** *** **** ** ***** * *** **** **** *** * *
* * *** * ** * ** ** *** * ** *** ** * * * * * ***** * * *
* ** ** * ****** *** *** ** ** *** ******** ** * * ***
* * * ** **** ** **** ** ** ** ***** ***** * ****
* * ****** * **** * * ** ******* * * *** * *
*** ** * * ** *** * * ** *** * * *** *** * ** *** * * **

  }






* ******* **** *** * * * * * ** * ** *** ***

 return 0;
}
最新回答 用戶: (236 分)
修改於 用戶:
0 0
prog.c: In function 'main':
prog.c:36:1: warning: implicit declaration of function 'system' [-Wimplicit-function-declaration]
 system("pause");
 ^~~~~~
0 1
Case 0: Correct output
0 0
prog.c: In function 'main':
prog.c:29:3: warning: implicit declaration of function 'system' [-Wimplicit-function-declaration]
   system("pause");
   ^~~~~~
0 0
Case 0: Correct output
0 0
Case 0: Correct output
0 0
Case 0: Correct output
0 0
Case 0: Correct output
0 0
Case 0: Wrong output
0 0
Case 0: Correct output
0 喜歡 0 不喜歡
內容已隱藏
* * * * * * * * *** **
int main()
{
* ** * * * * ****** * i;
** ***   char str[5000];
** ** ** ** *
* * * ** ** * * ** * * * str);
* *  
* * * ***** ** *** *** (i=0; * ** **** i++)
* ** *** ** ** *** * * * * *
* * * * * * *** *** **** **** * * * **** *** * * *
**** * **** *****   {
* *     ** * *     break;
* ** *       }
* * *     * * * else **** * * * ** *** ****** ** *
* * * ** * * ** * *** ** *** * * * {
* **** * ** * ** ** * ** ****** * * ** ** ** ** ** * *** *
*** ** * * *** * * * * ** * * ** *** * * * * * * *** * * * * * ****
* * * ** *** * **** ** * * }
** * * * *** * ** else
* * * ** ** * ** {

*** * **** ** ** * * ** }
* * * *** * *** * ****
* * * ********* **** ** ** **

****** * *** ******** 0;
}
最新回答 用戶: (202 分)
0 0
prog.c: In function 'main':
prog.c:22:11: warning: zero-length gnu_printf format string [-Wformat-zero-length]
    printf("",str[i]);
           ^~
0 0
Case 0: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include * ** ****** *** *

int main()
{
** * *** str[100];
* * * *ptr;
* * ****** u = 0, l = 0;

* * * *** * ;
* * * = * * **
* * * * (*ptr != '*')
* ** * *
**** * * * * **** * ** ** ****
* * *** * ***** ** *** * * *(ptr++) - 32);
* * * * ***** * if * ** * * ** *** *** *** * **
* ** * * ** ***** *** *** * **
* * ** *
******** *** *** * *****
** *
* ** ** ** ** * *
** ** *** ** 0;
}
最新回答 用戶: (228 分)
0 0
prog.c: In function 'main':
prog.c:9:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
  gets(str) ;
  ^~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/tmp/ccrUo9sb.o: In function `main':
prog.c:(.text+0x2d): warning: the `gets' function is dangerous and should not be used.
0 喜歡 0 不喜歡
內容已隱藏
*** * *** *
* * **** ** ** ** *

int
{
char
char *ptr; **
* *

** ** *
* ** * *
{
* * * * * * * ** **** *
* ** ***** ** ****
else
** * * ** *** ** **
}
}
最新回答 用戶: (228 分)
0 0
prog.c: In function 'main':
prog.c:8:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
  gets(s);
  ^~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/tmp/cc3WJuEP.o: In function `main':
prog.c:(.text+0x25): warning: the `gets' function is dangerous and should not be used.
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.127.233
©2016-2025

相關問題

2 喜歡 0 不喜歡
29 回答
[練習] Coding (C) - 最新提問 11月 9, 2017 分類:2017-1 程式設計(一)AD | 用戶: Shun-Po (18k 分)
ID: 31094 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 4.5k 瀏覽
2 喜歡 0 不喜歡
23 回答
[練習] Coding (C) - 最新提問 11月 9, 2017 分類:2017-1 程式設計(一)AD | 用戶: Shun-Po (18k 分)
ID: 31085 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 3.6k 瀏覽
3 喜歡 0 不喜歡
9 回答
[練習] 對錯二選一 - 最新提問 11月 16, 2017 分類:2017-1 程式設計(一)AD | 用戶: 楊修俊 (30k 分)
ID: 33764 - 從幾時開始: 2017-11-16 14:00 - 到幾時結束: 2017-11-16 14:30
| 835 瀏覽
3 喜歡 0 不喜歡
9 回答
[練習] 對錯二選一 - 最新提問 11月 16, 2017 分類:2017-1 程式設計(一)AD | 用戶: 楊修俊 (30k 分)
ID: 33763 - 從幾時開始: 2017-11-16 14:00 - 到幾時結束: 2017-11-16 14:30
| 759 瀏覽
3 喜歡 0 不喜歡
6 回答
[練習] Coding (C) - 最新提問 11月 30, 2017 分類:2017-1 程式設計(一)AD | 用戶: Shun-Po (18k 分)
ID: 34979 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 1.4k 瀏覽
12,783 問題
183,442 回答
172,219 留言
4,824 用戶