0 like 0 dislike
12.5k views
請撰寫一個程式,使用者會輸入一行字元,換行字元代表輸入結束,請計算所有的輸入當中有多少個英文字母,多少個數字,以及多少個其他的字元,並依照範例的格數輸出。

Sampile input:

1234567890ancdefghijklmnopqrstuvwxyz~!@#$%^&*()_+

Sample output:

digit:10
alphabet:26
other:13
[Exercise] Coding (C) - asked in 作業 by (18k points)
ID: 17578 - Available when: Unlimited - Due to: Unlimited
| 12.5k views
1 3
Called for Help

82 Answers

0 like 0 dislike
Hidden content!
** * * * ** *
** * * * **** *

void ** c)

{

printf * * * *** = * ** c);
* ** *** ( * (c))
** * *** *** * ***** * * *
* *** * ( * *** (c))
*** ** * * ** *** ** **
* * * ( ** * (c))
* * * * * ** ** ** ** ** * **
* * *** ( * * (c))
** ** * *** * ** * * * * *
** ( ** * (c))
* ** * ** * *** * * *


**** * * ( * (c))
** * * ** * * ** * ** **
* * * * ( * * (c))
** ** ** * ** * **** * *
* ( ** ** (c))
** ** ****** * *** * **
** * ( * (c))
** * ** * * * ******* *
* ** ( * (c))
* *** * ** *** * * * * * * ***

if ( * (c))
* * * * ***** ** ** * *
* * ;
* ** **



int main ( void )

{
** * c;
*** ( scanf **** * * * * *** != EOF)
* *** (c);
***** * 0;

}
answered by (-74 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>



#include <stdlib.h>



void reverse(int *data,int size);



int main()



 {


* * *** * * * ** * *** * ** data[100];


** * * * *** * **** * ****** * i,size;


** ***** * *** * ** * ** **** = 9;


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


******* *** * * * * * * * ** ** ** ** * = i+1;


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


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


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


** *** * * ** * *** *** *** * ** *** *** ** * = %d",data+i);


**** **** *** ** ** ** ** ****** * * **  Value = %d",*(data+i));


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


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


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


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


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


**** ** ** **** * ** *** * * * * * * *** * = %d",data+i);


* *** * * ** * **** **** * ** *** * * **  Value = %d",*(data+i));



    }


* *** ***** ****** ****** 0;



 }







void reverse(int *data,int size)



{


* *** ** * * * ** ** * i,temp;


* * * *** * ** % 2) == 1)


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


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


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


** * ** ** * * * * * * ** **** ** **** = *(data+i);


* * **** ** * *** * * ** * **** * = *(data+size-i-1);


* * * * * ** *** **** * * ***** * * * *** ** = temp;


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


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


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


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


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


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


**** **** ** ** * * ** *** * * * ** *** ** *** = *(data+i);


* * * * ***** * * * ** *** ** *** ******* = *(data+size-i-1);


** **** * ** * * ** * ** * ** **** *** ** = temp;


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


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


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



}
answered by (-114 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:104.23.243.108
©2016-2026

Related questions

0 like 0 dislike
0 answers
[Exercise] Essay (Open question) - asked Dec 28, 2016 in 作業 by Shun-Po (18k points)
ID: 20139 - Available when: Unlimited - Due to: Unlimited
| 763 views
0 like 0 dislike
20 answers
[Exercise] Essay (Open question) - asked Dec 21, 2016 in 作業 by Shun-Po (18k points)
ID: 19748 - Available when: Unlimited - Due to: Unlimited
| 4.2k views
0 like 0 dislike
26 answers
[Exercise] Essay (Open question) - asked Nov 9, 2016 in 作業 by Shun-Po (18k points)
ID: 17203 - Available when: Unlimited - Due to: Unlimited
| 5k views
0 like 0 dislike
0 answers
[Exercise] Essay (Open question) - asked Dec 28, 2016 in 作業 by Shun-Po (18k points)
ID: 20140 - Available when: Unlimited - Due to: Unlimited
| 793 views
0 like 0 dislike
3 answers
[Exercise] Essay (Open question) - asked Dec 21, 2016 in 作業 by Shun-Po (18k points)
ID: 19755 - Available when: Unlimited - Due to: Unlimited
| 1.2k views
12,783 questions
183,442 answers
172,219 comments
4,824 users