Toggle navigation
Courses
Questions
Tags
Users
AC 201612010 第二次期中考 第六題
0
like
0
dislike
4.5k
views
請設計一程式,使用者會輸入一個句子,一直到程式讀到句點”.”代表輸入結束,程式會將輸入的大寫英文字母轉成小寫、小寫英文字母轉成大寫後輸出。
輸入說明:輸入會包含英文字母、數字以及標點符號,當程式遇到句點(.)時代表輸入結束。
輸出說明:請將輸入當中的大寫字母轉成小寫,小寫字母轉成大寫,並保留其他的字元輸出。
輸入範例:
It Is A Good Day To Die.
輸出範例:
iT iS a gOOD dAY tO dIE.
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18077 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
reshown
Dec 1, 2016
by
Shun-Po
|
4.5k
views
comment
0
0
Called for Help
Please
log in
or
register
to add a comment.
63
Answers
0
like
0
dislike
Hidden content!
#include <stdio.h>
#include <ctype.h>
int check(char c)
{
int i;
**** ** * * ** ** *
*** * ** * * * ***
* **** * ** *** ****** ** *** * ** * ** * * *
* * **** * *** * * ** i;
}
int check2(char c)
{
int j;
*** * *** *** ** * ****
*** ** * **** * ** ** * ** * ***
*** ** *** *** ** * * *** *** * **** **
* * ** * **** * * * * * j;
}
int main ( void )
{
char c ;
*** **** * * ** ***** **** * * ** * * * *
* ** * ** * *** ** * *** != '.')
{
**** * ** * ** **** ** ** ***** * * ** * **
**** * **** *** * ** * ** ** ** * * * *** * ** ****
***** * **** * **** ***** * ** ** * ** ** ***** * *** * * *** * * * *
* ** *** * * * ** * * ** **** * ***** *** *
* ** ** * * ** * *** ** * ******* ** *** ** * ** tolower(c);
* ****** ** *** **** *** * * ** * ** ** * *** * *** * **** *** * * * * **
* * **** **** *** *** ** * * * * * * ** * **
* * * * * ***** *** * *** * * * * * * ** * * *** **** **** ***
** ***** * ** * ** * * * *** * ** *** *
* *** * * *** ** * * ****** * ** ** ** * * ***** *** * ** * * ** toupper(c);
* * * * **** * * *** * *** **** * * * *** * * ** * * * ** ** * * * ** * * * **
* * * *** * ****** *** ** *** * ****
* ** * *** * * ** *** * ***** * *** * **** * * ****** ** ** ** * ***
}
* * * ** * ** **** * 0;
}
answered
Dec 1, 2016
by
410211222
(
-186
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include ** * * ***** *
#include ** **** * *
#include * ** **
#include *** ** **
int main(void)
{
* ** * ** * * * * ** a=0,b=0,d=0;
* * ****** ** * *** * c;
*** * * * * * * ** * ** * * * * * ***
* *** ** *** ** ** (c!='\n')
{
* * **** ** * * * (islower(c))
** ** *** * * * ****** * * *
***** ** ** * * * * *** * **** * *** ** ** ** *** ** (c));}
* **** **** ** * ** *** (isupper(c))
* *** * ***** * * *** ** * **
* ** **** *** * * **** ** * * * ** = tolower (c));}
* * ** * ** ** *** * ****** ** * (c=='.')
* ****** *** * * **** * ****** ******* ** * ** ** *** *** ** *
* * * **** * * ** * ** ** * * ** *** *
}
* ** * * ** 0;
}
answered
Dec 1, 2016
by
410523016
(
-136
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * **** **** **
#include * * ** **
int main (void)
{
***** * * c;
* * * ***** ******* * ***
* ***** c!= '\n')
{
if ( islower (c))
*** * *** * * * * * *** ** * * * * * ****** ** ***
*** *** * **** ** ** ***** * * ** ** **
if ( isupper (c))
***** * * * *** *** ** * * * ** * ** *
** ***** * ** ******* * ***** ***
if ( c='.')
** ****** *** ** ** *** ** ** pause;
* *
* * ***** ** * * * * * * * *** * *
* ** ** ** ** ** *** **
}
* ** ** *** *** * *** 0;
}
answered
Dec 1, 2016
by
410523056
(
42
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* ** * * * * ***
int main(void)
{
char c;
** **** * *** **** * *
while(c != '\n')
*** * *** * * **
** * * * *** * ***** ** ** *** * * * * * *
*** ** * ** ** ** * = toupper(c);
* * * * * **** ** * **** ** *** * * * * ** * *
* * ** ** ** * * = tolower(c);
**** *** * ** ** * * *** ***** * **
*** * ** *** ****** ** ***** * **** *
*** ** * * * **** * *
return 0;
}
answered
Dec 1, 2016
by
s31102
(
-100
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>
int main()
{
char a[10000];
int q=0,n=0;
gets(a);
while (a[n]!='\0')
{
* * * *** * * * ***** * * ** * * *** ** *** * * ** * *
** *** ** * *** * * *** ** * *** * * * ** * ** ** * * ** ***
else if(a[n]=='b')
**** * * * * * ** ** ** * * ** ** * ** *** ***** ** * ** * ** *** *** **
else if(a[n]=='c')
** * *** ** * * ***** * **** ** * *** * * * ***** * * * *
else if(a[n]=='d')
* *** * **** * ** * *************** * * * * * ** ***** * * * *** *
else if(a[n]=='e')
* ***** ***** ** * ** * ** * **** * ** * *** *** *** ** *** * *
else if(a[n]=='f')
* * * ** * * * * ** * * * * ** * * * * * *** *** *
***** * * ** *** *** *** ** ****** ** * * * * * if(a[n]=='g')
* * * ***** * ** ** ** * * * ** ** * * * * * ** * *** **** *** * *** * * ** *
*** * * ** ** *** * * * * * ** **** * *** ** ***** if(a[n]=='h')
** * ** * ** * ** * ** * ** ********* * *** * ******* **** * **** **
* **** * * *** * ***** * * * ** **** * * ** if(a[n]=='i')
*** *** *** * ****** * * *** ***** * ** * ***** *** ** **** ** ** * *
* *** * * * **** * *** * * **** ** * * ** ** * if(a[n]=='j')
* ** *** * * ** ** *** ** ** **** * ** * ****** *** ********* ** *
** *** *** ** ** * ** * * *** * * * * if(a[n]=='k')
** *** **** * * * * **** * ** ** ** ** * **** * * *** **** * ** *
* *** * * * * * * ** ***** * * **** **** * if(a[n]=='l')
* *** * ** * ** *** * * * * * * * * * ** * * * ** * ** * * *
*** * * * *** * * * * * * ** * ** *** * * if(a[n]=='m')
* ******* * * ** ** * * * * *** * * * * ** * ** * ** * * * **** *
***** * ** ** *** * ** ***** ** **** * **** **** ** * if(a[n]=='n')
* ** ** ** * * * * ** ** ***** **** * ** ******* *** * ** * * *
* *** * * * ** ** ***** **** ** **** * if(a[n]=='o')
* * * * * ** ** ** * * ** * * * * * ** * ** * *** * *** *
else if(a[n]=='p')
* * * ** * * * ** * * *** *** * * *** * ** *** ** ***** *
*** * * ** ** *** ** ** * ** **** ** * * if(a[n]=='q')
* * *** * *** * ** * * *** * * * ** ** * *** ** *** * ** * **
else if(a[n]=='w')
* * * * * * * * ** ** * * * * * ** * * **** *
else if(a[n]=='x')
* * * *** * * * * ****** **** * * ** * ** *** ** * * * * * *
else if(a[n]=='y')
* * ** **** * * * * * * ******** * ** **** ** *** ** *
else if(a[n]=='z')
**** ******* ** * **** * * ****** *** * ********* * * **
else if(a[n]=='u')
* *** ** *** * *** *** *** * **** * * * * ** * * *** ** * ***** * *
* ** ** * ***** * *** * * ***** * if(a[n]=='r')
*** * * * *** **** ** * * **** * ** **** **** * * * ***
* * **** ** * * **** ** * *** ** ** * * * if(a[n]=='t')
** ** * ** *** ** **** * **** **** * * ** *** * * ** *** * * * **
** * * ** * ** * * * *** ** * * *** * *** if(a[n]=='s')
** * * ** * *** ***** ** * ***** * * **** ** * * * * ** ** * ** * *
* * * **** * * * * ** ** * * * * if(a[n]=='v')
* ****** **** ** ** * * **** * * ** *** * * * * **** * ***** * * ** **
** ** *** * *** * ** ***** ** * * ** ** ** * if(a[n]=='A')
*** **** ** **** *** * * ***** * *** ******* * ** * **** ** **
* ** ***** ****** * * * * * *** * * if(a[n]=='B')
* * * ** ** *** * *** * ** **** * * * * * ** *** * ** * * *
* ** * ** * * ** ** * *** ** * * * * * * ** if(a[n]=='C')
** ***** *** *** **** * * * ** ** * * * * * * **** * * *
* * *** * ** * *** * ** * * *** ** * * * *** * *** * if(a[n]=='D')
* **** * * * * **** * ***** * **** * *** ** ** ** * ******** * **********
* * * ** * ** * **** * *** ** ** ** * if(a[n]=='E')
* * * * * ** * * ************ * ******** ** * ** * * *** * * * *** ** * *
** ** * ** ** * *** * ** * ** * * *** *** * ** * if(a[n]=='F')
* * * *** * ** * * * * ** ** ***** * * ***** *** ** *** *** ** **
**** * * * * * * * *********** ** ***** * if(a[n]=='G')
* **** * * * * *** ** ** * * * ** ** ***** **** * ** ** ****
** ** * **** *** ** ** *** ** * **** ** ** if(a[n]=='H')
*** ** * * ** ** ** *** * * ** * ** ** * *** * * **** ** ** ** *
* *** * ** ** * * * * *** ** * **** * * * if(a[n]=='I')
* *** ** * * * * * * * * ** *** ** ** *** ** * *** **** ** ***** * ** **** *
* * * * **** **** *** * ** * * * ***** * if(a[n]=='J')
***** *** * ** * *** * * ***** * ***** ** * **** * *** ***** * ***
**** **** * * * ** ** * ****** * *** ** ** * * * * if(a[n]=='k')
* * **** * * * *** * ** * * ** ** ** ** ** * ** ** ** ** ***** ** * ** * ****
**** ** * ******** ** **** ** * **** * * if(a[n]=='L')
** ** ** * **** * * * ** ** *** ** * * ** * * ** *** * *
***** *** * ** **** ** ** ****** ** ******** if(a[n]=='M')
** *** * * * *** *** ** * ** * * * ** * ** ** * * * *** * *** * * * **
** * *** * * * * ** **** *** * * *** * ** if(a[n]=='N')
* * * ** * * ** ** ** *** ** * * ***** * ***** ** ************* * * **** * *
*** * ** * * * * ** * ** * * * ** ** *** * * * if(a[n]=='O')
* ***** ***** * * ** * * * ** ***** ** * * **** * ** * ** * * * *
* * * ** ** * ** ****** * * ** * *** * ** if(a[n]=='P')
** * * ** * * **** ** * ** * * * * * *** ** *** *** ** * * * ***
** **** * ** ** ** **** *** ** ****** ** ** ** * ** * if(a[n]=='Q')
*** * *** *** * *** *** *** ** * * **** * * **** * ** ** * * ** *
***** ** ** * * * * ** * * *** * if(a[n]=='W')
* * ** * ** ** *** * ** * *** ** * *********** * ** * * ***** * * ***
** ** ** * ** ** ** * * *** * ******* * * * ** ** ** if(a[n]=='X')
* * ** *** ** * * * ** *** ** *** * * ***** *** *** ** * * * ** **
*** ** *** * ** ** *** * ** *** ** ** if(a[n]=='Y')
* ** * * ** ******** **** * * * * ** * * ** ***** * **** *
** * * ** ** ** *** * ** * *** * ** ** * *** ** if(a[n]=='Z')
** ** * ** *** * * * * *** ** ** ****** *** * * * **** * * * ** * * ** *
** * *** * * ** *** ** ** * ** **** * if(a[n]=='U')
* * * * * ** * ** * ** ** ** * * * * * *** ********* ** * ** *
** **** ** *** * * *** **** * * ** ** * if(a[n]=='R')
** * ** ** ** * * * *** **** * *** * * * *** * ** * * * *
* * * * * *** * ** ** ******** ** ** **** if(a[n]=='T')
* **** *** **** * **** * ** ** ** ***** **** ** * ** ** * ****
** * * * * *** * ***** *** *** * * * **** **** * if(a[n]=='S')
** ** **** *** *** * * *** *** ***** ** * ** * * ** *** * *****
else if(a[n]=='V')
**** * **** ** ** *** ****** ** *** * * **** * * * * * * ** * ***
n = n+1;
}
printf("%s\n",a);
return 0;
}
answered
Dec 1, 2016
by
410323020
(
-85
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* ****** ******
* ***** *********
**** * *** * ** ***
* ** * ********* ***
* ( * )
{
* * **
** * * ** * * * **** *
* * != * )
{
* ( ** ( c )) * = ( c * * *** * *** * * *
* ***** ** ***** * ( ** ( c ** = ** * ( c * * * *** *** ** **
*
** * * **** * ** * * * ( ** * ( c )) *** *** * *
** * ** **** * * * * *
}
* ***** * ** * *
* 0;
}
answered
Dec 1, 2016
by
410523022
(
-276
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include<stdio.h>
#include<ctype.h>
int main(){
char c;
****** * * ** ***** * * *** ** * * * &c);
while(c != '.'){
* * ****** * * * * * ** * * ** * ** * **** * **
*** ** * ** ******* * ** *** ** * **** * * ** *** ** ** *** * * * = toupper(c);
* ** * * *** ** **** ** * * ** * * * ***** * ** ** ** * ** * **** * *** *** ****** * c);
** * ** *** *** * * * * *** ** * * * ** *
* *** * * * ** ** ****** * * * ****** if(isupper(c)){
** * * * * * * * * ** * * *** ** ** ** * ** * ** * = tolower(c);
*** * * *** **** * * ** * * * **** * * **** *** * * ** * * * ** ** * ***** ** * * **** * ****** c);
* *** * * ** ***** ** * ** * *** * *
* * * ** * * *** ** * * ** ** ** ** ****** * ** * *
** * ** **** *** * *** *** *** ** * * ** * * ******* * *** * * ** * *** ** * c);
* ** **** * ** * ** **** * ** ** * * * * *** * * * *** &c);
}
* * *** *** * ** * *
return 0;
}
answered
Dec 1, 2016
by
410342026
(
-105
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include<stdio.h>
#include<ctype.h>
int main(){
char c;
* **** ****** * * * *** * * **** ** &c);
* ** * * *** * * **** ** * != '.'){
* *** * * * * * * *** ** ** * ** * ** * * ** * *
* * *** * * ** ****** * * ** * * * * * * ** * **** * = toupper(c);
* * * * * ** ** ** *** * ** * *** ***** ** ***** * * * * *** * * *** * * c);
***** * * * ** * ** ** ** * ** * * *
***** ** ** * *** * * *** *** * ** * ** ** ** * if(isupper(c)){
*** ** * ** *** * * ****** **** * *** **** **** *** *** ** * * * = tolower(c);
* * **** ** *** * ** *** * **** * ** ****** * ** *** ** ** ** * * * ** * c);
* ** ****** * ** ********* ** **** *** *** ** **
** **** ***** ** * * * * *** * * ** * **
* * * * *** ** **** *** * *** ** ** * ** *** *** *** ***** * * * c);
*** **** ** * * ** ** *** * * * ** * ** * * **** ** * * * ** &c);
}
return 0;
}
answered
Dec 1, 2016
by
410342026
(
-105
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include<stdio.h>
#include<ctype.h>
int main(){
char c;
** * * * *** * * **** * ** * ** &c);
**** ** * * * * * **** != '.'){
* * * * * * *** **** * *** * * ** * **** ** **** *
* * * * ** * * ** ** * * * **** * **** ** * * * *** * ***** * = toupper(c);
**** * ******* ** ** ** *** ** ** ** * * ** * ** *** ** * ** * ***** ***** *** c);
**** ** * ** **** **** ***** ** * * * ***
* * * ** ****** * * * * **** * *** ***** * * * ****** if(isupper(c)){
**** * * **** * *** * ** **** * * *** *** * ** * ** * * = tolower(c);
** *** ** * * * *** * **** * ** ** *********** ** * ** * * * * *** c);
* * * * ** **** * *** * *** *** * ** * ** *
** *** * ******** * * *** * ** *** ** * *
*** * ** ******* * * * ****** *** * * ** * ** **** ** *** ** **** * * *** * c);
***** * * * ** * * * * * * * * ** ** * **** ** &c);
}
return 0;
}
answered
Dec 1, 2016
by
410342026
(
-105
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* *** * * * ** **
* * ***
* * *
* * * * * * *
** ( * )
* **
* * *** *** *** * ***
** * )
*
* ** ( c * = * ( c * ** ***** *
** ( *** ( c = ** ( c * *** ** * ** ** *
* * * ** * ** ** * * ***
*
* * * * ***** *** *
* *
answered
Dec 1, 2016
by
410523022
(
-276
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
2
3
4
5
6
7
next »
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.69.17.50
©2016-2025
Related questions
0
like
0
dislike
16
answers
AC 20161201 第二次期中考 第五題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18075 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
1.9k
views
0
like
0
dislike
86
answers
AC 20161201第二次期中考 第四題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18071 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
5.9k
views
0
like
0
dislike
49
answers
AC 20161201 第二次期中考 第三題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18070 -
Available when:
Unlimited
-
Due to:
Unlimited
|
3.5k
views
0
like
0
dislike
62
answers
AC 20161201 第二次期中考 第二題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18067 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
4.7k
views
12,783
questions
183,442
answers
172,219
comments
4,824
users