Toggle navigation
Courses
Questions
Tags
Users
AD 201612010 第二次期中考 第六題
0
like
0
dislike
3.6k
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 程式設計(一)AD
by
Shun-Po
(
18k
points)
ID: 18076 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
reshown
Dec 1, 2016
by
Shun-Po
|
3.6k
views
comment
Please
log in
or
register
to add a comment.
41
Answers
0
like
0
dislike
Hidden content!
* ** * ** * *** **
* ******* ***
* * * ** * ** *
int main ( ){
** ** * c ;
* * *** (c!='.') {
* * **** * * * * **** * * * ** * * ( * * * ** * * *
* * * * ( islower (c)){
c=c-32;
* ***
*** * ** *
*** *** * * * ** ** ** ** ******
*** * * * ** * * *** * **
*** ***
* ** 0;
* ** *
answered
Dec 1, 2016
by
爾皓
(
-304
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>
#include<ctype.h>
int main()
{
char c;
*** * * ** * ** * * * * * * * ** ***** * **** *
* * *** * ** * *** ** *** * != '.')
{
* ** * * * **** ** * ** *** ** * **** ****
***** ** * * ** * *** * *** * * * ** *
** * * ** * *** **** *** * * * ** *** * * * * *** = c - 32;
** * *** ****** * * * * ** ************* ** * * ** * ** * ** * * * ** *
** * * * **** * ** ** * **** **** *
** ** * * * * * * ** * *** ** ***
* *** * * * ******** *** * *** * * *** *
* * * * * *** **** * ** **** *** **
* * * **** ** * ** **** * * * **** *** ** *** ** * * * = c + 32;
***** *** ** ** *** * * * *** **** * * ** * * *** * * ** ** ** * *** ***
***** ******** * * ** ** *** * * * *
* ** ** ** ** * ***** * * * * * *** ** **
*** ** * **** * * *********** ** * **** * ** ** ****** ** *
** *** *** * *** * ** ** ******* ** ** **** * ** *** *** **
}
*** * * * * * * ** ******** ***
** **** *** * * *** * * ***** * * ****
return 0;
}
answered
Dec 1, 2016
by
410523043
(
156
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>
#include<ctype.h>
int main()
{
char c;
* * ** * * *** * * *** **** **
* * * *** * * ** * * * != '.')
{
*** * * ** ** ** **** *** **** *** ***** *
** * * * * * ** ** ** * * **
** * *** * * ** * **** ** *** *** *** * ** ** * = c - 32;
** * * * ** * ** * ** * ** ***** * * *** * ***** ** * ** ** *
** ** * * * * * * ******** ****** * *
*** * * *** * **** ** * ***** ** ** ** ** * * *
** ** * **** *** ***** ** *** * * *** *** ** ***
** * *** ******* * * * * *** * **** ** *
***** * * * *** * *** *** ** * * ** * **** * *** * = c + 32;
* ** *** * **** ** *** *** ** * ** ** * * * ** ** * * **** * *
* * **** * * ** * *** * *** * ** ** * * * *
* **** **** * **** * ** * *** ** * * * **
* **** * *** * ** ** * ** *** * *** * *** ***** ** **** ** * * ** ** *
*** * *** * ***** * ** *** * * ** * *** * * * ** * * * *
}
** ** ** *** * * * * * * * ** *** ** ***
return 0;
}
answered
Dec 1, 2016
by
410523043
(
156
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>
#include <ctype.h>
int main()
{
**** * * ** **** ** ******** c;
*** ****** * * * ** *** * * * ** &c);
** * * * ***** * * * != '.')
{
** ****** **** * ** ***** ** ** ** * * ****** * * ****
** ** ** * * ** *** * *** ** ** *
* ***** * * ** * ***** * * * ** * * * ** ** * ** * *** = c + 32;
* **** ******** ** * ** * * ** *** **** *
** * ** * * ******* * *** ** ** * * **** *** if(islower(c))
****** *** * ** * * ****** ** ***
* * ** * * ** ** **** * * ** ** ** ****** *** * * **** = c - 32;
* * ** * **** ** *** *** * * ** * * *
** *** * * * ** * ****** * * * * ** *** * * * * * * * * c);
*** * *** ****** *** * * *** * *** * ***** **** * ** ******** &c);
}
** *** * **** ** * ** ** ***** * * **
* * * **** *** * *** * ****** * * * *** ****
*** ** * ** ** **** ** 0;
}
answered
Dec 1, 2016
by
kyle wen
(
-202
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>
#include<ctype.h>
int main()
{
** *** ** * *** ** ** a,t;
** * *** ** * ** *** * ***
{
***** ** * ** *** ** ** * ****** * * ** ** * * * * *** * * ** * ** **** * **** * ** * * ** *** **
* ** * *** * **** * ***** * **** ** * ** * ** **** ********* *** * * * * *** *
** * * **** * * ** ****** * **** * * * ** * ** * * * ***** * ** ***** * * ******* ***
* **** * * ** *** *** *** * * *** * *** * **** * ** * ** ***** *****
*** *** ** * * ** *** ** * ***** * ****** **** ** * * **** * * ******* * * * * * ** **
* * * * ** *** * * ** ******** *** **** * * ****** * *** * ******** * * * *
* ******* **** ** *** * ** * *** * * ** * ** * * * **** ** ** ** ****** * * ** ** *** *** if(isupper(a))
* * **** * * ** ***** * * ** ** *** ** ***** * * * *** ** **** * **
* * ** * * * ** ** * ** * * ** * ** ** *** *** ** * ** ** ** * * * * * ** ***
* ** *** ** ** * **** * * **** * * * * * *** ** * * * * * * * ** ** ** * *** *
* * ***** ** * ** ** * * *** ** ** ** * * ** ***** ****** ** ** ** * * * * * * ** * *
}
**** ** ** *** *** * * ** ***
* * * * ****** * * ** * * 0;
}
answered
Dec 1, 2016
by
410523005
(
122
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include *** * ** *
* ** * * ** *****
* * **** *** *
int main()
{
char c;
* * * * *** * * ***** , ** *
while(c != '.')
{
** **
*** * *****
****
** * * = * * *
** **** * ***** * * * c);
}
* ** * **** *
****
*** ** * = * * *
** ** ** **** * * ** ** * c);
}
* * **
* *
** * * * * * c);
*** * *
* * *
*** * *
* **
**** ** *** * , * * ***
}
****** * *** *
* * * ** * *
return 0;
}
answered
Dec 1, 2016
by
410223045
(
-194
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include * *** * * ** *
*** * * ** ****** **
* * *** *** * **
int main()
{
char c;
** ** ** *** * * , ** *
while(c != '.')
{
* ***
** *** *** *
** **
* * = * *
* ***** ** * ** * * ** c);
}
* **** **
*** ****
**** * = ** **
* *** * ** * * c);
}
* * **
* ** * **
* **** ** ** * *** *
*
* * *
* * *
* * * ** * * * * ** * , * ** **
}
** *** * * * *
** * * ** * * * *
return 0;
}
answered
Dec 1, 2016
by
410223045
(
-194
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include<stdio.h>
***** * ** *
* ** ** ** **
int main()
{
** ***** ** * c;
** * * **
** ** * ** ** * * * *** * * ** * &c);
*** ****** ** *
* ****** * **** * ** * != '.')
{
* ** **** *** **** *** * ***** ** *
** * * * ** * * ***
** * ** ** * * * * ******** * * = tolower (c);
** ** * ***** ** ** ** ** *** * ***** ("%c", c);
* * ** * ***** *** * **
* * ** **** ** * ***
* * * *** *** * * if(islower(c))
* * * * ********* ** ** ***
****** * ** * ** * **** ** * = toupper (c);
* * ****** *** ** ** * ** ** * * ** ** ** * * * , c);
* * ***** ** ** * * * *
****** * * * ** *** ** * ***
** * ** * ** * ** **** ** ** **** * , c);
* * ** * ***** *** ** **** * **** ** *** * *** ****
* * * * ** ******** ** * ** * * * ** * ** , &c);
}
** ** * * ** * ** **** * * * * **
** * * ** * * ** ** ******* ** ** **
*** * * ***** * * 0;
*** ** * *** **** *
}
answered
Dec 1, 2016
by
410223055
(
-186
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * * ** * ** * *
****** ** ** **** * **
* ***** *** ** * *
int main()
{
**** *** ***** ** c;
* *** * ** ** *** ** * **** &c);
** * *** * * * * != '.')
{
** *** ***** * * ****** ** *** **
* * ******* *** ** * * * * * **
* ** * ** ** * * **** ** = tolower (c);
* * * ***** *** *** *** * ** * ("%c", c);
* * * ** ** * ***** *
* * ** * * * ** * ****
* ** * * ** * *** *** if(islower(c))
* * * * ** * * * * *
*** * ** * ** * *** *** = toupper (c);
**** * * * *** * ** * * * ** *** * ** *** **** * , c);
*** * **** * * * *** * *
** ** * **** *** *** ** * * * *
** * * * * *** * * * * *** * *** * * ** * * "); * * * * * * *** **** *** *
*** ** * * * * * * *** * ****** ** *** ** ** , &c);
}
******* * **** * * *** *** * * ******
** * * * ***
**** **** **** **** * * **
* * **
** * * * ***** * * *** 0;
* ** * * * *** *** *
}
answered
Dec 1, 2016
by
410223055
(
-186
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include * ** * * *
#include * * * ** * *
#include *** ** *
int main(int argc, char *argv[]){
** * * * *** **** * ** c;
* ** ** ** * *** * *
**** ** * *** * * ***** *** = getchar()) != '.'){
***** **** * ** ** *** ** * * * *** ***
** * * * ***** * ** * * ** * * * ** * * * ** *** * *
**** **** * ***** ** * * **** * ** * *****
* ** * *** **** * *** ** *** * * ** ** * * * *
** ***** *** ** **
** * ** * * * * *
*** *** ** * * * * *** * * *
* * *** * 0;
}
answered
Dec 1, 2016
by
Dhgir.Abien
(
-216
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
2
3
4
5
next »
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:108.162.216.177
©2016-2025
Related questions
0
like
0
dislike
5
answers
AD 20161201 第二次期中考 第五題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AD
by
Shun-Po
(
18k
points)
ID: 18074 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
916
views
0
like
0
dislike
96
answers
AD 20161201第二次期中考 第四題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AD
by
Shun-Po
(
18k
points)
ID: 18072 -
Available when:
Unlimited
-
Due to:
Unlimited
|
5.9k
views
0
like
0
dislike
13
answers
AD 20161201 第二次期中考 第三題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AD
by
Shun-Po
(
18k
points)
ID: 18069 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
1.4k
views
0
like
0
dislike
67
answers
AD 20161201 第二次期中考 第二題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AD
by
Shun-Po
(
18k
points)
ID: 18068 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
4.4k
views
12,783
questions
183,442
answers
172,219
comments
4,824
users