From d897a797d836fc8c87b39cd92fdffccc29181e7c Mon Sep 17 00:00:00 2001 From: repitile Date: Fri, 18 Nov 2016 22:48:19 +0200 Subject: [PATCH] Create 04_domashno4.3 --- G/04/22/04_domashno4.3 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 G/04/22/04_domashno4.3 diff --git a/G/04/22/04_domashno4.3 b/G/04/22/04_domashno4.3 new file mode 100644 index 000000000..96725196e --- /dev/null +++ b/G/04/22/04_domashno4.3 @@ -0,0 +1,24 @@ +#include +#include + int main() + { + char c[1000],d; + int m[30]; + a=0; + while(a<30) + { + m[a]=0; + a++; + } + fgets(c,1000,stdin); + for(int i=0;i<=strlen(c);i++){ + for(int b=0,d='a',g='A';b<30;b++){ + if(c[i]==d||c[i]==g){ + m[b]++;break;}d++;g++;}} + d='a'; + for(int ns=0;ns<30;ns++,d++){ + if(m[ns]==0) + continue; + printf("%c - %d\n", d, m[ns]);} + return 0; + }