Toggle navigation
Courses
Questions
Tags
Users
AD 20161124 exercise 1
0
like
0
dislike
3.8k
views
請撰寫一個程式,使用者會輸入一行字元,換行字元代表輸入結束,請計算所有的輸入當中有多少個英文字母,多少個數字,以及多少個其他的字元,並依照範例的格數輸出。
Sampile input:
1234567890ancdefghijklmnopqrstuvwxyz~!@#$%^&*()_+
Sample output:
digit:10
alphabet:26
other:13
[Exercise]
Coding (C)
-
asked
Nov 24, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 17667 -
Available when:
Unlimited
-
Due to:
Unlimited
recategorized
Nov 24, 2016
by
Shun-Po
|
3.8k
views
comment
0
0
Called for Help
Please
log in
or
register
to add a comment.
65
Answers
0
like
0
dislike
Hidden content!
#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
int main(void)
{
***** ** * * **** * * * *** c;
** ** * * * ** * * **** i=0, j=0, k=0;
** ** ****** ** ***** * *** * ** * * * * **
* * *** *** * ** * * * ** != '\n')
{
** * ***** * **** * ** ** * * *** * *** *
** ****** * * **** * * ******** * **** ** * ****** ** * * *
* * * ** **** * * * *** * * if(isalpha(c))
*** ** *** * * *** *** ** ** * * * ***** * * * **** *
** ** * ********** ** * * ** * ** *** ***
** ** *** * ** * ********* * ** * ** ** * ** ** ** * ** ** ***
* * * * *** ** ** * * * ****** * * **** ** ***** ** ** ** **
}
* * ** ** * ** ** * ** ** *** * * *
** * * *** * ** * * **** *** ** **** * * *
* ** *** * ******** ** * ***** * * * ** *****
**** * *** * * * * * **** ** * * ********
** * * ******* *** 0;
}
answered
Nov 24, 2016
by
楊傑宇
(
-202
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;
* * *** ** * a=0,n=0,o=0;
* * * *** ***** = getchar();
** ** ******* * * * != '\n'){
*** * * ** * ** * * * *****
* ** * ** * * * ** ****** ****** * *** **
* * * * * ***** *** * ** **** if(isdigit(c))
** * * * ** * **** ***** *** ***** ** *** *
* * * * *** *** * ** ** * * * * ****
*** ** ***** ** * * * * ** ** * ** * * *****
** *** * *** ** ** * ** * *** * * = getchar();
***** * *** *
** * ** * ******** * ***** * ** * **
** *** *** ** * * *** * * *** ** * **
* * * * * *** * * * *
***** * * * ** **** * * ** * * *
* * * * 0;
}
answered
Nov 24, 2016
by
Dhgir.Abien
(
-216
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include *** *** *** *
#include *** * *
int main(int argc, char *argv[])
{
* * * * **** * c;
** * a=0,n=0,o=0;
*** * * *** **** = getchar() && c != '\n'){
* ******** *** * * *** **** ** ***
***** * ** *** * * ** ** * * ****** * * *
** ** * ** * * * * * ** if(isdigit(c))
* ***** * * * *** * **** ** *****
* * **** ** * * *******
* * * ** * * ** * * ** ** ** * * * ****
**** * * * ****
******* * * **
* *** * * ** * ****** ** *** * ******
* ** *** *** ** * * * ***** * * **
******* * ******* * ** *****
* * * * * * 0;
}
answered
Nov 24, 2016
by
Dhgir.Abien
(
-216
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include * ** *** *
#include *** ***** *
int main(int argc, char *argv[])
{
** * * *** * c;
* * ** * *** a=0,n=0,o=0;
**** ***** ** = getchar() && c != '\n'){
** * **** ** * * **** * * *******
*** ** ***** *** * * **** * * * ** ** * *
** **** **** * * ******* * * * *** if(isdigit(c))
** * ** *** ** * * * * ** ** * * * * **
** ****** * ** **** * * **** * ** *
** ****** ** * ** * * * ** ** * * * * * *** *
** * ** * ***** *
* *** ** *
* ** * * ********* * * ******* * *
** * ** *** * *** * * * ***** *
**** ** * * ** ** * * ***** * * **
* * ** ****** * 0;
}
answered
Nov 24, 2016
by
Dhgir.Abien
(
-216
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include * ** * ***** **
#include ******* * *
int main(int argc, char *argv[])
{
* *** *** **** c;
* * ** * * * a=0,n=0,o=0;
** ** * * * * = getchar() && c != '\n'){
** ***** * * ** * ** * *** ****
* ** ** **** * * *** ** ** ** ** * **** * * * *
* * * ** * * ****** * * if(isdigit(c))
* * * ****** * ** *** ** * * * * * ** **
* * ** ** *** ** * *** *
* ** * ** ** ** * *** ** **** ** * ** *
* * * ***
**** * ** * *
** **** **** ** * * * * ** * ** *
* **** * * * ** * * * ** *
* ***** **** ** * * ** * * ****** *
* * ** *** **** ***** ****
* ** * * * 0;
}
answered
Nov 24, 2016
by
Dhgir.Abien
(
-216
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
...
4
5
6
7
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.70.179.46
©2016-2025
Related questions
0
like
0
dislike
23
answers
AD 20161222 exercise 1
[Exercise]
Essay (Open question)
-
asked
Dec 22, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 19793 -
Available when:
Unlimited
-
Due to:
Unlimited
|
1.7k
views
0
like
0
dislike
20
answers
AD 20161110 exercise 1
[Exercise]
Essay (Open question)
-
asked
Nov 10, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 17220 -
Available when:
Unlimited
-
Due to:
Unlimited
|
1.6k
views
0
like
0
dislike
7
answers
AD 20161222 exercise 2
[Exercise]
Essay (Open question)
-
asked
Dec 22, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 19794 -
Available when:
Unlimited
-
Due to:
Unlimited
|
836
views
0
like
0
dislike
26
answers
AD 20161103 作業1
[Exercise]
Coding (C)
-
asked
Nov 3, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 16957 -
Available when:
Unlimited
-
Due to:
Unlimited
|
2k
views
0
like
0
dislike
37
answers
AD 20161020 作業 1
[Exercise]
Coding (C)
-
asked
Oct 20, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 14579 -
Available when:
Unlimited
-
Due to:
Unlimited
|
2.5k
views
12,783
questions
183,442
answers
172,219
comments
4,824
users