Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Create 03_domashno4.3.c #987

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions G/04/22/03_domashno4.3.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include<stdio.h>
#include<string.h>
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;
}